|
@@ -1,215 +1,124 @@
|
|
<template>
|
|
<template>
|
|
<div class="secureselftest">
|
|
<div class="secureselftest">
|
|
- <div class="list">
|
|
|
|
- <!-- <div v-if="readList.length == 0"> -->
|
|
|
|
- <div
|
|
|
|
- class="list-row"
|
|
|
|
- v-for="(item, index) in readList"
|
|
|
|
- @click="
|
|
|
|
- junmpMyMechantsDetails(
|
|
|
|
- item.routeParam,
|
|
|
|
- item.handleType,
|
|
|
|
- item.readType
|
|
|
|
- )
|
|
|
|
- "
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
- <div class="cell_1">
|
|
|
|
- <div class="width100 height44rpx mb16rpx">
|
|
|
|
- <div class="first_title">
|
|
|
|
- {{ item.title }}
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="toReadItem" v-for="item in msgList" @tap="showDialog(item)" >
|
|
|
|
+ <div class="readTitle">【{{item.type}}】</div>
|
|
|
|
+ <div class="readInfo">{{item.info}}</div>
|
|
|
|
+ <div class="readTime">2024-04-25 09:00</div>
|
|
|
|
+ </div>
|
|
|
|
+ <van-dialog
|
|
|
|
+ use-slot
|
|
|
|
+ title="消息提醒"
|
|
|
|
+ :show="show"
|
|
|
|
+ :show-cancel-button="false"
|
|
|
|
+ confirm-button-text="我知道了"
|
|
|
|
+ confirm-button-color="rgba(87, 107, 149, 1)"
|
|
|
|
+ @confirm="confirm"
|
|
|
|
+ width="640rpx"
|
|
|
|
+ >
|
|
|
|
+ <div class="dialogBox">
|
|
|
|
+ <div class="dialogInfoTitle">XXXXSSSSSXX企业名称XXXX企业的合同即将到期,请尽快续约。</div>
|
|
|
|
+ <div class="dialogInfo">
|
|
|
|
+ <div class="infoRow">
|
|
|
|
+ <span class="infoTitle">合同编号:</span>
|
|
|
|
+ <span class="infoMsg">HT20240514</span>
|
|
</div>
|
|
</div>
|
|
- <div class="width100 height40rpx">
|
|
|
|
- <div class="second_title" style="width: 100%">
|
|
|
|
- {{ item.createdAt }}
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="infoRow">
|
|
|
|
+ <span class="infoTitle">关联载体:</span>
|
|
|
|
+ <span class="infoMsg"></span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="infoRow">
|
|
|
|
+ <span class="infoTitle">合同起止日期:</span>
|
|
|
|
+ <span class="infoMsg">2023/01/01 ~ 2024/12/30</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- </div> -->
|
|
|
|
- <!-- <div v-else> -->
|
|
|
|
- <van-empty
|
|
|
|
- v-if="readList.length == 0"
|
|
|
|
- class="disblock marginauto"
|
|
|
|
- style="background: white"
|
|
|
|
- description="暂无数据"
|
|
|
|
- />
|
|
|
|
- <!-- </div> -->
|
|
|
|
- </div>
|
|
|
|
|
|
+ </van-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
- <script>
|
|
|
|
-import { readList, getByCodes, getUserLocalStorageInfo } from "@/js_sdk/http";
|
|
|
|
-import vanEmpty from "../../../wxcomponents/weapp/dist/empty/index";
|
|
|
|
|
|
|
|
|
|
+<script>
|
|
export default {
|
|
export default {
|
|
- components: {
|
|
|
|
- vanEmpty,
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- dic_key: ["safety_inspection_type"],
|
|
|
|
- dic_SelectList: {},
|
|
|
|
- active: 0,
|
|
|
|
- readList: [],
|
|
|
|
- search: {
|
|
|
|
- pageSize: 10,
|
|
|
|
- pageNum: 1,
|
|
|
|
- types: "5,6",
|
|
|
|
- userId: "",
|
|
|
|
- },
|
|
|
|
- statusList: [
|
|
|
|
- { label: "全部", value: null },
|
|
|
|
- { label: "电梯自检", value: "1" },
|
|
|
|
- { label: "消防自检", value: "2" },
|
|
|
|
- { label: "电柜检查", value: "3" },
|
|
|
|
- { label: "电器线路", value: "4" },
|
|
|
|
|
|
+ data(){
|
|
|
|
+ return{
|
|
|
|
+ msgList:[
|
|
|
|
+ {type:'合同到期提醒',info:'xxxxsssSSXX企业名称XXXX企业的合同即将到期请尽快续约.'}
|
|
],
|
|
],
|
|
- };
|
|
|
|
|
|
+ show:false
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- onShow() {
|
|
|
|
- // this.getByCodes();
|
|
|
|
- this.search.userId = getUserLocalStorageInfo().id;
|
|
|
|
- this.getreadList();
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- getDicType(value) {
|
|
|
|
- if (!value) return "未知类型";
|
|
|
|
-
|
|
|
|
- let safety_inspection_type = this.dic_SelectList.safety_inspection_type;
|
|
|
|
- let index = safety_inspection_type.findIndex((e) => e.value == value);
|
|
|
|
- return safety_inspection_type[index].label;
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- junmpMyMechantsDetails(routeParam, type, readType) {
|
|
|
|
- console.log(type);
|
|
|
|
- console.log(routeParam);
|
|
|
|
- if (readType == 6) {
|
|
|
|
- let param = routeParam.split(",");
|
|
|
|
- console.log(param);
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/subPackages/repairprocessing-app/detail?id=" + param[1],
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (type == 6) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url:
|
|
|
|
- "/pages/subPackages/repairprocessing-app/detail?id=" + routeParam,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (type == 5) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url:
|
|
|
|
- "/pages/subPackages/merchants/components/mymechantsdetails?id=" +
|
|
|
|
- routeParam,
|
|
|
|
- });
|
|
|
|
|
|
+ methods:{
|
|
|
|
+ showDialog(item){
|
|
|
|
+ if (item.type === '合同到期提醒'){
|
|
|
|
+ this.show = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- jumpReport() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/subPackages/secureselftest/report?id=" + null,
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- async getMoreListData() {
|
|
|
|
- let that = this;
|
|
|
|
|
|
+ confirm(){
|
|
|
|
|
|
- that.search.pageNum = that.search.pageNum + 1;
|
|
|
|
- let list = await readList(that.search);
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
- if (list.rows == 0) {
|
|
|
|
- that.$showToast("没有更多数据了");
|
|
|
|
- } else {
|
|
|
|
- list.rows.forEach((e) => {
|
|
|
|
- that.readList.push(e);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- onReachBottom() {
|
|
|
|
- this.getMoreListData();
|
|
|
|
- }, //下拉执行的时候触发 (下拉刷新)
|
|
|
|
- onChange(e) {
|
|
|
|
- this.search.type = e.detail.name == null ? "" : e.detail.name;
|
|
|
|
- this.getreadList();
|
|
|
|
- },
|
|
|
|
- endDate() {
|
|
|
|
- return this.getDate("end");
|
|
|
|
- },
|
|
|
|
- startDate() {
|
|
|
|
- return this.getDate("start");
|
|
|
|
- },
|
|
|
|
|
|
+</script>
|
|
|
|
|
|
- async getByCodes() {
|
|
|
|
- let data = await getByCodes(JSON.stringify(this.dic_key));
|
|
|
|
- this.dic_SelectList = this.$common.handleDicList(data);
|
|
|
|
- this.getreadList();
|
|
|
|
- },
|
|
|
|
- getDate(type) {
|
|
|
|
- const date = new Date();
|
|
|
|
- let year = date.getFullYear();
|
|
|
|
- let month = date.getMonth() + 1;
|
|
|
|
- let day = date.getDate();
|
|
|
|
|
|
|
|
- if (type === "start") {
|
|
|
|
- year = year - 60;
|
|
|
|
- } else if (type === "end") {
|
|
|
|
- year = year + 2;
|
|
|
|
|
|
+<style lang="scss">
|
|
|
|
+ .secureselftest{
|
|
|
|
+ .toReadItem{
|
|
|
|
+ margin-top: 24rpx;
|
|
|
|
+ margin-left: 32rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ background: white;
|
|
|
|
+ width: 686rpx;
|
|
|
|
+ padding: 32rpx;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
+ .readTitle{
|
|
|
|
+ color: rgba(3, 101, 249, 1);
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ }
|
|
|
|
+ .readInfo{
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ line-height: 42rpx;
|
|
|
|
+ padding: 16rpx 0;
|
|
|
|
+ }
|
|
|
|
+ .readTime{
|
|
|
|
+ color: rgba(102, 102, 102, 1);
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- month = month > 9 ? month : "0" + month;
|
|
|
|
- day = day > 9 ? day : "0" + day;
|
|
|
|
- return `${year}-${month}-${day}`;
|
|
|
|
- },
|
|
|
|
- async getreadList() {
|
|
|
|
- this.search.pageSize = 10;
|
|
|
|
- this.search.pageNum = 1;
|
|
|
|
- let list = await readList(this.search);
|
|
|
|
- // /wx/SafetyController/readList
|
|
|
|
|
|
+ .dialogBox{
|
|
|
|
+ padding: 36rpx 24rpx;
|
|
|
|
+ .dialogInfoTitle{
|
|
|
|
+ color:rgba(53, 53, 53, 1);
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 48rpx;
|
|
|
|
+ margin-bottom: 32rpx;
|
|
|
|
+ }
|
|
|
|
+ .dialogInfo{
|
|
|
|
+ background: rgba(245, 247, 250, 1);
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ width: 592rpx;
|
|
|
|
+ padding: 20rpx 16rpx;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ .infoRow{
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ }
|
|
|
|
+ .infoTitle{
|
|
|
|
+ width: 196rpx;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
|
+ }
|
|
|
|
+ .infoMsg{
|
|
|
|
+ color:rgba(102, 102, 102, 1);
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|
|
|
|
|
|
- this.readList = list.rows;
|
|
|
|
- },
|
|
|
|
- jumpAddCompanyPage() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/subPackages/addCompany/addCompany",
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
|
|
- jumpPage(e) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/subPackages/companyDetails/companyDetails?id=" + e,
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-};
|
|
|
|
-</script>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <style lang="scss">
|
|
|
|
-.chooseyears {
|
|
|
|
- width: 326rpx;
|
|
|
|
- height: 56rpx;
|
|
|
|
- background: rgba(29, 24, 188, 0.05);
|
|
|
|
- border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 56rpx;
|
|
|
|
- display: flex;
|
|
|
|
- color: #1d18bc;
|
|
|
|
-}
|
|
|
|
-.searchbox {
|
|
|
|
- display: block;
|
|
|
|
- background: white;
|
|
|
|
-}
|
|
|
|
-.chaochuyincang {
|
|
|
|
- white-space: nowrap;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
-}
|
|
|
|
-.secureselftest {
|
|
|
|
- .custom-class {
|
|
|
|
- background: white;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|