|
@@ -26,12 +26,14 @@
|
|
|
<view class="selectCol">
|
|
|
<picker
|
|
|
style="max-width: 80%"
|
|
|
- :range="[]"
|
|
|
- range-key="label"
|
|
|
+ :range="userList"
|
|
|
+ range-key="CName"
|
|
|
@change="handelChange"
|
|
|
>
|
|
|
<view class="pickerSlot">
|
|
|
- <view class="itemText"> 提交人 </view>
|
|
|
+ <view class="itemText">
|
|
|
+ {{ projectFilter.author_name || "提交人" }}
|
|
|
+ </view>
|
|
|
<!-- v-if="selectedValues[index] === null" -->
|
|
|
<image
|
|
|
class="triangle"
|
|
@@ -40,12 +42,12 @@
|
|
|
/>
|
|
|
</view>
|
|
|
</picker>
|
|
|
- <!-- <uni-icons
|
|
|
- v-if="selectedValues[index] !== null"
|
|
|
+ <uni-icons
|
|
|
+ v-if="projectFilter.author_name"
|
|
|
type="closeempty"
|
|
|
size="14"
|
|
|
- @click="cleanSelect(index)"
|
|
|
- ></uni-icons> -->
|
|
|
+ @click="cleanSelect()"
|
|
|
+ ></uni-icons>
|
|
|
</view>
|
|
|
<view class="selectCol">
|
|
|
<uniDatetimePicker
|
|
@@ -57,12 +59,11 @@
|
|
|
>
|
|
|
<view class="pickerSlot">
|
|
|
<view class="itemText">
|
|
|
- <!-- {{
|
|
|
- timerange.length !== 0
|
|
|
- ? `${timerange[0]}~${timerange[0]}`
|
|
|
- : item.placeholder
|
|
|
- }} -->
|
|
|
- 发布日期
|
|
|
+ {{
|
|
|
+ projectFilter.s_time
|
|
|
+ ? `${projectFilter.s_time}~${projectFilter.e_time}`
|
|
|
+ : "发布日期"
|
|
|
+ }}
|
|
|
</view>
|
|
|
<image
|
|
|
class="triangle"
|
|
@@ -71,12 +72,12 @@
|
|
|
/>
|
|
|
</view>
|
|
|
</uniDatetimePicker>
|
|
|
- <!-- <uni-icons
|
|
|
- v-if="timerange.length === 2"
|
|
|
+ <uni-icons
|
|
|
+ v-if="projectFilter.s_time"
|
|
|
type="closeempty"
|
|
|
size="14"
|
|
|
- @click="cleanSelect(index)"
|
|
|
- ></uni-icons> -->
|
|
|
+ @click="cleanTime()"
|
|
|
+ ></uni-icons>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -110,6 +111,7 @@
|
|
|
<script>
|
|
|
import uniDatetimePicker from "@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue";
|
|
|
import moment from "moment";
|
|
|
+import { mapState, mapActions } from "vuex";
|
|
|
import { queryProjectDaily } from "@/services/daily";
|
|
|
import mixin from "@/utils/listMixin";
|
|
|
|
|
@@ -132,13 +134,26 @@ export default {
|
|
|
return t ? moment(t).format("MM-DD HH:mm") : "-";
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState(["userList"]),
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ ...mapActions(["queryUserList"]),
|
|
|
handelSearchConfirm() {
|
|
|
this.pagination.currentPage = 1;
|
|
|
this.initData();
|
|
|
},
|
|
|
handelChange(e) {
|
|
|
- this.projectFilter.author = e.target.value
|
|
|
+ let select = this.userList[e.target.value];
|
|
|
+ this.projectFilter.author = select.ID;
|
|
|
+ this.projectFilter.author_name = select.CName;
|
|
|
+
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
+ cleanSelect() {
|
|
|
+ this.projectFilter.author = null;
|
|
|
+ this.projectFilter.author_name = null;
|
|
|
|
|
|
this.pagination.currentPage = 1;
|
|
|
this.initData();
|
|
@@ -161,6 +176,13 @@ export default {
|
|
|
this.pagination.currentPage = 1;
|
|
|
this.initData();
|
|
|
},
|
|
|
+ cleanTime() {
|
|
|
+ this.projectFilter.s_time = null;
|
|
|
+ this.projectFilter.e_time = null;
|
|
|
+
|
|
|
+ this.pagination.currentPage = 1;
|
|
|
+ this.initData();
|
|
|
+ },
|
|
|
async getList(params) {
|
|
|
console.log(params);
|
|
|
let res = await queryProjectDaily({
|
|
@@ -173,6 +195,7 @@ export default {
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.project_id = options.project_id;
|
|
|
+ this.queryUserList();
|
|
|
},
|
|
|
onShow() {
|
|
|
this.pagination.currentPage = 1;
|