Browse Source

新增锦水档案

master
ZhaoTongYao 5 years ago
parent
commit
830d83cb11
  1. 2
      .vscode/settings.json
  2. 7
      project.config.json
  3. 8
      subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.js
  4. 3
      subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.json
  5. 3
      subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxml
  6. 30
      subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxss
  7. BIN
      subpages/understandJs/images/archivesbk.png
  8. BIN
      subpages/understandJs/images/right.png
  9. 2
      subpages/understandJs/pages/archives/archives.js
  10. 2
      subpages/understandJs/pages/archives/archives.json
  11. 4
      subpages/understandJs/pages/archives/archives.wxml
  12. 45
      subpages/understandJs/pages/archives/archives.wxss
  13. 37
      subpages/understandJs/pages/archivesDept/archivesDept.js
  14. 27
      subpages/understandJs/pages/archivesDept/archivesDept.wxml
  15. 85
      subpages/understandJs/pages/archivesDept/archivesDept.wxss
  16. 6
      subpages/understandJs/pages/archivesDetail/archivesDetail.js
  17. 4
      subpages/understandJs/pages/archivesDetail/archivesDetail.json
  18. 20
      subpages/understandJs/pages/archivesDetail/archivesDetail.wxml
  19. 14
      subpages/understandJs/pages/archivesDetail/archivesDetail.wxss
  20. 4
      utils/config.js

2
.vscode/settings.json

@ -3,6 +3,6 @@
"*.cjson": "jsonc", "*.cjson": "jsonc",
"*.wxss": "css", "*.wxss": "css",
"*.wxs": "javascript", "*.wxs": "javascript",
"*.wxml": "html" "*.wxml": "wxml"
} }
} }

7
project.config.json

@ -108,6 +108,13 @@
"pathName": "subpages/associationNew/pages/eventlist/eventlist", "pathName": "subpages/associationNew/pages/eventlist/eventlist",
"query": "partyGroupId=4048a5a044a047d9a3dc135a0d756eee&topicType=1", "query": "partyGroupId=4048a5a044a047d9a3dc135a0d756eee&topicType=1",
"scene": null "scene": null
},
{
"id": -1,
"name": "锦水档案",
"pathName": "subpages/understandJs/pages/archives/archives",
"query": "",
"scene": null
} }
] ]
} }

8
subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.js

@ -0,0 +1,8 @@
Component({
data: {
},
methods: {
}
})

3
subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.json

@ -0,0 +1,3 @@
{
"component": true
}

3
subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxml

@ -0,0 +1,3 @@
<view class="preload-archives-detail">
<view class="detail-item" wx:for="{{[1,2,3,4,5,6]}}"></view>
</view>

30
subpages/understandJs/compontents/preLoadArchivesDetail/preLoadArchivesDetail.wxss

@ -0,0 +1,30 @@
.preload-archives-detail {
width: 100%;
background: #fff;
box-sizing: border-box;
border-radius: 16rpx;
padding: 0 24rpx;
overflow: hidden;
margin-bottom: 20rpx;
}
.preload-archives-detail .detail-item {
width: 100%;
height: 80rpx;
border-radius: 8rpx;
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
animation: loading 1.4s ease infinite;
background-size: 400% 100%;
margin-top: 20rpx;
}
@keyframes loading {
0% {
background-position: 100% 50%
}
100% {
background-position: 0 50%
}
}

BIN
subpages/understandJs/images/archivesbk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
subpages/understandJs/images/right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

2
subpages/understandJs/pages/archives/archives.js

@ -65,7 +65,7 @@ Page({
} }
let that = this let that = this
wx.navigateTo({ wx.navigateTo({
url: `../archivesDept/archivesDept?dept=搜索&deptId=&searchContent=${that.data.searchContent}` url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent}`
}) })
}, },

2
subpages/understandJs/pages/archives/archives.json

@ -1,5 +1,7 @@
{ {
"navigationBarTitleText": "锦水档案", "navigationBarTitleText": "锦水档案",
"navigationBarBackgroundColor": "#D22E29",
"navigationBarTextStyle": "white",
"usingComponents": { "usingComponents": {
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata" "no-data":"../../../../components/nodata/nodata"

4
subpages/understandJs/pages/archives/archives.wxml

@ -1,11 +1,12 @@
<view class="top"> <view class="top">
<image class="topbk" src="../../images/archivesbk.png"/>
<view class="search"> <view class="search">
<view class="item-all"> <view class="item-all">
<view class="item-left"> <view class="item-left">
<image src="../../images/search.png"></image> <image src="../../images/search.png"></image>
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> <input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input>
</view> </view>
<button class="item-right" bindtap="searchFile">搜索</button> <button class="item-right" bindtap="searchFile" hover-class="none">搜索</button>
</view> </view>
</view> </view>
</view> </view>
@ -19,6 +20,7 @@
wx:key="index" wx:key="index"
class="list-item" bindtap="navigateToDept" data-dept-id="{{item.deptId}}" data-dept="{{item.dept}}"> class="list-item" bindtap="navigateToDept" data-dept-id="{{item.deptId}}" data-dept="{{item.dept}}">
<view class="list-name">{{item.dept}}</view> <view class="list-name">{{item.dept}}</view>
<image src="../../images/right.png" class="list-arrow"></image>
</view> </view>
</view> </view>

45
subpages/understandJs/pages/archives/archives.wxss

@ -8,19 +8,24 @@ page {
height: 94rpx; height: 94rpx;
background: #fff; background: #fff;
display: flex; display: flex;
align-items: center; justify-content: center;
}
.topbk {
position: absolute;
width: 100%;
height: 376rpx;
top: 0rpx;
} }
.search { .search {
/* margin-top: 17rpx; */ /* margin-top: 17rpx; */
width: calc(100% - 60rpx); width: calc(100% - 60rpx);
height: 66rpx; height: 66rpx;
margin-left: 30rpx; background: rgba(255, 255, 255, 1);
background: rgba(242, 242, 242, 1);
border-radius: 33rpx; border-radius: 33rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute;
} }
.search .item-all { .search .item-all {
@ -64,14 +69,15 @@ page {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
background-color: #fff;
} }
button { button {
width: 53rpx; width: 100rpx;
height: 28rpx; height: 58rpx;
padding: 0; padding: 0;
border-radius: 0; border-radius: 0;
line-height: 28rpx; line-height: 58rpx;
} }
button::after { button::after {
@ -82,25 +88,36 @@ button::after {
/* 列表 */ /* 列表 */
.dept-list { .dept-list {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: 1fr;
place-items: center; place-items: center;
gap: 30rpx 0; gap: 30rpx 0;
width: 690rpx; width: 690rpx;
padding: 20rpx 0; padding: 20rpx 0;
margin: 0 auto; margin: 0 auto;
position: absolute;
top: 296rpx;
left: 30rpx;
} }
.list-item { .list-item {
width: 300rpx; width: 100%;
height: 200rpx; height: 130rpx;
background: #fff; background: #fff;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center; align-items: center;
border-radius: 14rpx;
} }
.list-item .list-name { .list-item .list-name {
font-size: 34rpx; font-size:32rpx;
font-weight: 500; font-family:PingFang SC;
color: rgba(51, 51, 51, 1); font-weight:bold;
color:rgba(51,51,51,1);
margin-left: 40rpx;
}
.list-item .list-arrow {
width: 16rpx;
height: 26rpx;
margin-right: 42rpx;
} }

37
subpages/understandJs/pages/archivesDept/archivesDept.js

@ -5,14 +5,16 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
pageindex: 1, pageIndex: 1,
pagesize: 10, pageSize: 10,
searchContent: '', searchContent: '',
deptId:'', deptId:'',
archivesList: [], archivesList: [],
nodata: false, nodata: false,
loadMoreType: 'none', loadMoreType: 'none',
loadMoreVisible: false loadMoreVisible: false,
deptName: '',
listType: 0 //档案列表样式 1-搜索样式 0-无搜索样式
}, },
/** /**
@ -22,7 +24,9 @@ Page({
console.log(options) console.log(options)
this.setData({ this.setData({
searchContent: options.searchContent, searchContent: options.searchContent,
deptId: options.deptId deptId: options.deptId,
deptName: options.dept,
listType: options.searchContent.length
}) })
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: options.dept title: options.dept
@ -37,22 +41,14 @@ Page({
}, },
searchFile () { searchFile () {
console.log(this.data.searchContent) this.data.archivesList = []
if(!this.data.searchContent.length) {
wx.showToast({
title: '不能为空',
icon: 'loading',
duration: 2000
})
return;
}
this.search(this.data.deptId, this.data.searchContent) this.search(this.data.deptId, this.data.searchContent)
}, },
search(deptId, keywords) { search(deptId, keywords) {
let params = { let params = {
pageindex: this.data.pageindex, pageIndex: this.data.pageIndex,
pagesize: this.data.pagesize, pageSize: this.data.pageSize,
deptId, deptId,
searchContent: keywords searchContent: keywords
} }
@ -60,6 +56,7 @@ Page({
console.log('搜索接口', res); console.log('搜索接口', res);
this.setData({ this.setData({
archivesList: [...this.data.archivesList,...res.data], archivesList: [...this.data.archivesList,...res.data],
nodata: false,
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
loadMoreVisible: res.data.length === this.data.pageSize ? false : true loadMoreVisible: res.data.length === this.data.pageSize ? false : true
}) })
@ -69,6 +66,16 @@ Page({
loadMoreType: 'none', loadMoreType: 'none',
loadMoreVisible: false, loadMoreVisible: false,
}) })
} else if (keywords != '') {
let reg = new RegExp(keywords,'g')
this.data.archivesList.forEach(item => {
item.title = item.title.replace(reg,'<span style="color:red">'+keywords+'</span>')
item.archivesNum = item.archivesNum.replace(reg,'<span style="color:red">'+keywords+'</span>')
})
this.setData({
archivesList: this.data.archivesList
})
console.log(this.data.archivesList)
} }
}).catch(err => { }).catch(err => {
this.setData({ this.setData({

27
subpages/understandJs/pages/archivesDept/archivesDept.wxml

@ -6,24 +6,37 @@
<image src="../../images/search.png"></image> <image src="../../images/search.png"></image>
<input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input> <input placeholder-class="placeholder-style" placeholder="输入档案关键字" bindinput="bindInputValue" value="{{searchContent}}"></input>
</view> </view>
<button class="item-right" bindtap="searchFile">搜索</button> <button class="item-right" bindtap="searchFile" hover-class="none">搜索</button>
</view> </view>
</view> </view>
</view> </view>
<view class="archives-dept">{{dept}}</view> <view class="archives-dept" wx:if="{{deptId!=''}}">{{deptName}}档案</view>
<view class="archives-list"> <view class="archives-list" wx:if="{{listType!=0}}">
<view
wx:for="{{archivesList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="index"
class="search-archives-item" bindtap="goToArchivesDetail" data-archive-id="{{item.id}}">
<view class="search-archives-id"><rich-text nodes="<div style='overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>档号:{{item.archivesNum}}</div>"></rich-text></view>
<view class="search-archives-line"></view>
<view class="search-archives-title"><rich-text nodes="题目:{{item.title}}"></rich-text></view>
<!-- <view >归档时间:{{item.archiveTime}}</view> -->
</view>
</view>
<view class="archives-list" wx:else>
<view <view
wx:for="{{archivesList}}" wx:for="{{archivesList}}"
wx:for-index="index" wx:for-index="index"
wx:for-item="item" wx:for-item="item"
wx:key="index" wx:key="index"
class="archives-item" bindtap="goToArchivesDetail" data-archive-id="{{item.id}}"> class="archives-item" bindtap="goToArchivesDetail" data-archive-id="{{item.id}}">
<view >档号:{{item.archivesNum}}</view> <view class="archives-id"><rich-text nodes="<div style='overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'>档号:{{item.archivesNum}}</div>"></rich-text></view>
<view >题名:{{item.title}}</view> <view class="archives-title"><rich-text nodes="题目:{{item.title}}"></rich-text></view>
<view >归档时间:{{item.archiveTime}}</view> <view class="archives-line"></view>
<!-- <view >归档时间:{{item.archiveTime}}</view> -->
</view> </view>
</view> </view>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data> <no-data isShow="{{nodata}}"></no-data>

85
subpages/understandJs/pages/archivesDept/archivesDept.wxss

@ -65,14 +65,15 @@ page {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
background-color: rgba(242, 242, 242, 1);
} }
button { button {
width: 53rpx; width: 100rpx;
height: 28rpx; height: 58rpx;
padding: 0; padding: 0;
border-radius: 0; border-radius: 0;
line-height: 28rpx; line-height: 58rpx;
} }
button::after { button::after {
@ -81,12 +82,80 @@ button::after {
} }
.archives-list { .archives-list {
width: 690rpx; width: 100%;
margin: 0 auto; margin: 16rpx 0rpx auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.archives-list .archives-item { .archives-list .search-archives-item {
border: 1px solid #BFBFBF; margin-top: 16rpx;
margin-top: 10rpx; }
.archives-dept {
height: 94rpx;
background-color: white;
line-height: 94rpx;
padding-left: 32rpx;
font-size:32rpx;
font-family:PingFang SC;
font-weight:bold;
color:rgba(51,51,51,1);
}
.search-archives-id {
background-color: white;
height: 94rpx;
line-height: 94rpx;
font-size:32rpx;
font-family:PingFang SC;
font-weight:bold;
color:rgba(51,51,51,1);
padding: 0rpx 32rpx;
box-sizing: border-box;
}
.search-archives-title {
background-color: white;
line-height: 52rpx;
font-size:30rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(101,101,101,1);
padding: 28rpx 32rpx 32rpx;
box-sizing: border-box;
overflow: hidden;
}
.search-archives-line {
width:690rpx;
height:1px;
background:rgba(241,241,241,1);
border-radius:0px;
margin: 0 auto;
}
.archives-id {
background-color: white;
height: 94rpx;
line-height: 94rpx;
font-size:30rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(101,101,101,1);
padding: 0rpx 32rpx;
box-sizing: border-box;
}
.archives-title {
background-color: white;
line-height: 52rpx;
font-size:30rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(101,101,101,1);
padding: 0rpx 32rpx 32rpx;
box-sizing: border-box;
overflow: hidden;
}
.archives-line {
width:690rpx;
height:1px;
background:rgba(241,241,241,1);
border-radius:0px;
margin: 0 auto;
} }

6
subpages/understandJs/pages/archivesDetail/archivesDetail.js

@ -7,7 +7,8 @@ Page({
*/ */
data: { data: {
archiveId: '', archiveId: '',
archiveContent: '' archiveContent: '',
preloadVisible: true
}, },
/** /**
@ -25,7 +26,8 @@ Page({
api.archiveDetail(this.data.archiveId).then(res => { api.archiveDetail(this.data.archiveId).then(res => {
console.log('档案详情', res); console.log('档案详情', res);
this.setData({ this.setData({
archiveContent:res.data archiveContent: res.data,
preloadVisible: false
}); });
}) })
}, },

4
subpages/understandJs/pages/archivesDetail/archivesDetail.json

@ -1,4 +1,6 @@
{ {
"usingComponents": {}, "usingComponents": {
"preload-archives-detail": "../../compontents/preLoadArchivesDetail/preLoadArchivesDetail"
},
"navigationBarTitleText": "档案内容" "navigationBarTitleText": "档案内容"
} }

20
subpages/understandJs/pages/archivesDetail/archivesDetail.wxml

@ -1,2 +1,20 @@
<!--subpages/understandJs/pages/archivesDetail/archivesDetail.wxml--> <!--subpages/understandJs/pages/archivesDetail/archivesDetail.wxml-->
<view>{{archiveContent}}</view> <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<block wx:if="{{!preloadVisible}}">
<view class="archive-item">档号: {{archiveContent.archivesNum||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">文号: {{archiveContent.docNum||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">责任人: {{archiveContent.responsible||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">题名: {{archiveContent.title||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">日期: {{filter.formatTime(archiveContent.archiveTime,'yyyyMMdd')||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">页数: {{archiveContent.pageSize||'无'}}</view>
<view class="archive-line"></view>
<view class="archive-item">备注: {{archiveContent.remark||'无'}}</view>
<view class="archive-line"></view>
</block>
<preload-archives-detail wx:else></preload-archives-detail>

14
subpages/understandJs/pages/archivesDetail/archivesDetail.wxss

@ -1 +1,15 @@
/* subpages/understandJs/pages/archivesDetail/archivesDetail.wxss */ /* subpages/understandJs/pages/archivesDetail/archivesDetail.wxss */
.archive-item {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51,51,51,1);
margin: 34rpx 32rpx;
}
.archive-line {
width:690rpx;
height:1px;
background:rgba(242,242,242,1);
border-radius:1px;
margin: 0 auto;
}

4
utils/config.js

@ -6,13 +6,13 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境 return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址 // return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址
// return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址 // return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址
// return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址 // return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址
// return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址 // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址
return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址 // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
// return 'http://10.10.10.64:9094/epdc-api/api/' // return 'http://10.10.10.64:9094/epdc-api/api/'
} }

Loading…
Cancel
Save