|
@@ -19,7 +19,7 @@
|
|
|
style="padding: 20rpx 30rpx"
|
|
|
:radius="20"
|
|
|
placeholder="请输入日志标题"
|
|
|
- v-model="filter.searchKeyword"
|
|
|
+ v-model="projectFilter.searchKeyword"
|
|
|
@confirm="handelSearchConfirm"
|
|
|
/>
|
|
|
<view class="selectRow">
|
|
@@ -86,21 +86,22 @@
|
|
|
scroll-y="true"
|
|
|
@scrolltolower="scrollToLower()"
|
|
|
>
|
|
|
- <view class="item">
|
|
|
+ <view class="item" v-for="item in list" :key="item.id">
|
|
|
<view class="box">
|
|
|
- <view class="title">张三的金科环境项目日志</view>
|
|
|
+ <view class="title">{{ item.title }}</view>
|
|
|
<view class="desc">
|
|
|
<view class="desc-title">日志概述:</view>
|
|
|
<view class="desc-content">
|
|
|
- 项目进展顺利项目进展顺利项目进项目进展顺利项目进展顺利项目进
|
|
|
+ {{ item.content }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bottom">
|
|
|
- <view class="time">07-12 8:50</view>
|
|
|
- <view class="user">提交人:xxx</view>
|
|
|
+ <view class="time">{{ item.c_time | time }}</view>
|
|
|
+ <view class="user">提交人:{{ item.author_name }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="loadmore">{{ loadMoreText }}</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -109,40 +110,74 @@
|
|
|
<script>
|
|
|
import uniDatetimePicker from "@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue";
|
|
|
import moment from "moment";
|
|
|
+import { queryProjectDaily } from "@/services/daily";
|
|
|
+import mixin from "@/utils/listMixin";
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
uniDatetimePicker,
|
|
|
},
|
|
|
+ mixins: [mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
scrollTop: 0,
|
|
|
- filter: { searchKeyword: "" },
|
|
|
+ projectFilter: { searchKeyword: "", s_time: "", e_time: "" },
|
|
|
project_id: "",
|
|
|
+ list: [],
|
|
|
+ loadMoreText: "暂无数据",
|
|
|
};
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ time(t) {
|
|
|
+ return t ? moment(t).format("MM-DD HH:mm") : "-";
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
- handelSearchConfirm() {},
|
|
|
- handelChange() {},
|
|
|
+ handelSearchConfirm() {
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ handelChange(e) {
|
|
|
+ this.projectFilter.author = e.target.value
|
|
|
+
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
scrollToLower() {
|
|
|
- // if (this.projectList.length >= this.pagination.total) {
|
|
|
- // this.loadMoreText = "没有更多数据了";
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // this.pagination.currentPage++;
|
|
|
- // this.initData();
|
|
|
+ if (this.list.length >= this.pagination.total) {
|
|
|
+ this.loadMoreText = "没有更多数据了";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.pagination.currentPage++;
|
|
|
+ this.initData();
|
|
|
},
|
|
|
handelTimePickerChange(time) {
|
|
|
if (time.length !== 2) {
|
|
|
return;
|
|
|
}
|
|
|
- this.filter.start = moment(time[0]).format("YYYY-MM-DD 00:00:00");
|
|
|
+ this.projectFilter.s_time = moment(time[0]).format("YYYY-MM-DD 00:00:00");
|
|
|
+ this.projectFilter.e_time = moment(time[1]).format("YYYY-MM-DD 23:59:59");
|
|
|
|
|
|
- this.filter.end = moment(time[1]).format("YYYY-MM-DD 23:59:59");
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ async getList(params) {
|
|
|
+ console.log(params);
|
|
|
+ let res = await queryProjectDaily({
|
|
|
+ ...params,
|
|
|
+ project_id: this.project_id,
|
|
|
+ });
|
|
|
+ this.list = res.data.list;
|
|
|
+ return res.data;
|
|
|
},
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.project_id = options.project_id;
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|