会议通知时间选择
This commit is contained in:
@@ -112,20 +112,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleClick(index) {
|
handleClick(index) {
|
||||||
let url
|
this.params = index;
|
||||||
|
this.isList = false;
|
||||||
if (index == 0 || index == 2) {
|
if (index == 0 || index == 2) {
|
||||||
this.comp = "meetingList";
|
this.comp = "meetingList";
|
||||||
this.params = index;
|
|
||||||
this.isList = false;
|
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
url = "/pages/meetingNotice/components/belongToMe"
|
this.comp = "belongToMe";
|
||||||
}
|
}
|
||||||
uni.navigateTo({url})
|
|
||||||
},
|
},
|
||||||
add() {
|
add() {
|
||||||
uni.navigateTo({
|
this.isList = false;
|
||||||
url: "/pages/meetingNotice/components/addMeeting"
|
this.comp = "addMeeting";
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -142,6 +139,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter");
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<AiUploader :multiple="true" type="file" :limit="9" placeholder="上传附件" @list="fileList" :def="form.files"></AiUploader>
|
<AiUploader :multiple="true" type="file" :limit="9" placeholder="上传附件" @list="fileList"
|
||||||
|
:def="form.files"></AiUploader>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card item-wrap" @click="select">
|
<div class="card item-wrap" @click="select">
|
||||||
@@ -71,9 +72,10 @@
|
|||||||
<div @click="add(1)">发布会议</div>
|
<div @click="add(1)">发布会议</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<u-picker mode="time" v-model="show" :params="params" @confirm="confirm"></u-picker>
|
<u-datetime-picker mode="datetime" :show="show" :value="value" @confirm="confirm"></u-datetime-picker>
|
||||||
<AiBack ref="aiBack" v-if="!userSelect"/>
|
<AiBack ref="aiBack" v-if="!userSelect"/>
|
||||||
<AiSelectEnterprise :visible.sync="userSelect" :value="form.attendees" v-if="userSelect" @change="change"></AiSelectEnterprise>
|
<AiSelectEnterprise :visible.sync="userSelect" :value="form.attendees" v-if="userSelect"
|
||||||
|
@change="change"></AiSelectEnterprise>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -84,7 +86,7 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "addMeeting",
|
name: "addMeeting",
|
||||||
components: {AiBack,AiSelectEnterprise,AiUploader},
|
components: {AiBack, AiSelectEnterprise, AiUploader},
|
||||||
data() {
|
data() {
|
||||||
const initTime = {
|
const initTime = {
|
||||||
time: "",
|
time: "",
|
||||||
@@ -111,19 +113,19 @@
|
|||||||
files: [],
|
files: [],
|
||||||
},
|
},
|
||||||
userSelect: false,
|
userSelect: false,
|
||||||
|
value: Number(new Date())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opt) {
|
onLoad(opt) {
|
||||||
if(opt.id) {
|
if (opt.id) {
|
||||||
this.form.id = opt.id
|
this.form.id = opt.id
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter");
|
this.$nextTick(() => {
|
||||||
this.$nextTick(()=>{
|
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
this.form.startTime.time = date.getHours()?.toString()?.padStart(2, "0") + ":" + date.getMinutes()?.toString()?.padStart(2, "0")
|
this.form.startTime.time = date.getHours()?.toString()?.padStart(2, "0") + ":" + date.getMinutes()?.toString()?.padStart(2, "0")
|
||||||
this.form.startTime.year = date.getFullYear()
|
this.form.startTime.year = date.getFullYear()
|
||||||
this.form.startTime.month = (date.getMonth()+1)?.toString()?.padStart(2, "0")
|
this.form.startTime.month = (date.getMonth() + 1)?.toString()?.padStart(2, "0")
|
||||||
this.form.startTime.day = date.getDate()
|
this.form.startTime.day = date.getDate()
|
||||||
this.form.startTime.weekday = '日一二三四五六'.charAt(date.getDay())
|
this.form.startTime.weekday = '日一二三四五六'.charAt(date.getDay())
|
||||||
this.form.endTime = {...this.form.startTime}
|
this.form.endTime = {...this.form.startTime}
|
||||||
@@ -142,10 +144,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fileList(e){
|
fileList(e) {
|
||||||
this.form.files = e
|
this.form.files = e
|
||||||
},
|
},
|
||||||
change(e){
|
change(e) {
|
||||||
this.form.attendees = e
|
this.form.attendees = e
|
||||||
},
|
},
|
||||||
beforeNoticeChange(e) {
|
beforeNoticeChange(e) {
|
||||||
@@ -155,12 +157,12 @@
|
|||||||
this.form.noticeAfter = e.detail.value
|
this.form.noticeAfter = e.detail.value
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetail(){
|
getDetail() {
|
||||||
this.$http.post("/app/appmeetinginfo/info-id",null,{
|
this.$http.post("/app/appmeetinginfo/info-id", null, {
|
||||||
params:{
|
params: {
|
||||||
id:this.form.id
|
id: this.form.id
|
||||||
}
|
}
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
this.form.title = res.data.title
|
this.form.title = res.data.title
|
||||||
this.form.address = res.data.address
|
this.form.address = res.data.address
|
||||||
@@ -186,23 +188,33 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
if (new Date().getTime() / 1000 > e.timestamp) return this.$u.toast("选择时间不能小于当前时间")
|
const date = new Date(e.value);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = date.getMonth() + 1;
|
||||||
|
const day = date.getDate();
|
||||||
|
const hours = date.getHours();
|
||||||
|
const minutes = date.getMinutes();
|
||||||
|
const seconds = date.getSeconds();
|
||||||
|
const weekday = date.getDay();
|
||||||
|
|
||||||
|
if (new Date().getTime() / 1000 > e.value) return this.$u.toast("选择时间不能小于当前时间")
|
||||||
if (this.index == 0) {
|
if (this.index == 0) {
|
||||||
this.form.startTime = {...e}
|
this.form.startTime = {year,month,day,timestamp:e.vaule}
|
||||||
this.form.startTime.time = e.hour + ":" + (e.minute.length > 1 ? e.minute : ("0" + e.minute))
|
this.form.startTime.time = hours + ":" + minutes
|
||||||
this.form.startTime.weekday = '日一二三四五六'.charAt(new Date(e.timestamp * 1000).getDay())
|
this.form.startTime.weekday = '一二三四五六日'.charAt(weekday)
|
||||||
} else {
|
} else {
|
||||||
if (this.form.startTime.timestamp >= e.timestamp) {
|
if (this.form.startTime.timestamp >= e.value) {
|
||||||
return this.$u.toast("结束时间不能小于开始时间");
|
return this.$u.toast("结束时间不能小于开始时间");
|
||||||
}
|
}
|
||||||
this.form.endTime = {...e}
|
this.form.endTime = {year,month,day,timestamp:e.vaule}
|
||||||
this.form.endTime.time = e.hour + ":" + (e.minute.length > 1 ? e.minute : ("0" + e.minute))
|
this.form.endTime.time = hours + ":" + minutes
|
||||||
this.form.endTime.weekday = '日一二三四五六'.charAt(new Date(e.timestamp * 1000).getDay())
|
this.form.endTime.weekday = '一二三四五六日'.charAt(weekday)
|
||||||
}
|
}
|
||||||
|
this.show = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
add(status) {
|
add(status) {
|
||||||
if(status==1){
|
if (status == 1) {
|
||||||
if (!this.form.title) return this.$u.toast("请输入会议标题")
|
if (!this.form.title) return this.$u.toast("请输入会议标题")
|
||||||
|
|
||||||
if (this.form.startTime.timestamp >= this.form.endTime.timestamp) return this.$u.toast("结束时间不能小于开始时间")
|
if (this.form.startTime.timestamp >= this.form.endTime.timestamp) return this.$u.toast("结束时间不能小于开始时间")
|
||||||
@@ -211,12 +223,12 @@
|
|||||||
|
|
||||||
if (!this.form.content) return this.$u.toast("请输入会议内容")
|
if (!this.form.content) return this.$u.toast("请输入会议内容")
|
||||||
|
|
||||||
if(!this.form.attendees.length) return this.$u.toast("请选择参会人")
|
if (!this.form.attendees.length) return this.$u.toast("请选择参会人")
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$http.post("/app/appmeetinginfo/add-update", {
|
this.$http.post("/app/appmeetinginfo/add-update", {
|
||||||
...this.form,
|
...this.form,
|
||||||
files:this.form.files.map(e=>e.id),
|
files: this.form.files.map(e => e.id),
|
||||||
status,
|
status,
|
||||||
startTime: this.form.startTime.year + "-" + this.form.startTime.month + "-" + this.form.startTime.day + " " + this.form.startTime.time + ":00",
|
startTime: this.form.startTime.year + "-" + this.form.startTime.month + "-" + this.form.startTime.day + " " + this.form.startTime.time + ":00",
|
||||||
endTime: this.form.endTime.year + "-" + this.form.endTime.month + "-" + this.form.endTime.day + " " + this.form.endTime.time + ":00",
|
endTime: this.form.endTime.year + "-" + this.form.endTime.month + "-" + this.form.endTime.day + " " + this.form.endTime.time + ":00",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="belong-to-me">
|
<div class="belong-to-me">
|
||||||
<ai-top-fixed>
|
<ai-top-fixed>
|
||||||
<u-tabs :list="tabs" :is-scroll="false" :current="index" bar-width="88" :height="96" @change="change"></u-tabs>
|
<u-tabs :list="tabs" :is-scroll="false" :current="index" bar-width="88" :height="96" @click="change"></u-tabs>
|
||||||
</ai-top-fixed>
|
</ai-top-fixed>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<template v-if="list.length">
|
<template v-if="list.length">
|
||||||
@@ -54,9 +54,6 @@
|
|||||||
status: "加载更多",
|
status: "加载更多",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
tabs() {
|
tabs() {
|
||||||
return [
|
return [
|
||||||
@@ -100,12 +97,16 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
change(e) {
|
change(e) {
|
||||||
this.index = e
|
this.index = e.index
|
||||||
this.current = 1
|
this.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current = this.current + 1;
|
this.current = this.current + 1;
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -44,8 +44,7 @@
|
|||||||
components: {AiBack, AiEmpty},
|
components: {AiBack, AiEmpty},
|
||||||
props: {
|
props: {
|
||||||
params: {
|
params: {
|
||||||
type: String,
|
type: [String,Number,Object],
|
||||||
default: ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<img :src="$cdn + 'common/xzn.png'" v-else alt="">
|
<img :src="$cdn + 'common/xzn.png'" v-else alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="person" v-if="item.type==0">
|
<div class="person" v-if="item.type==0">
|
||||||
<u-avatar :src="item.avatar || ($cdn + 'common/xztx.png')" mode="square" :size="74"></u-avatar>
|
<u-avatar :src="item.avatar || ($cdn + 'common/xztx.png')" mode="square" :size="37"></u-avatar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<u-row justify="between" style="width: 100%;">
|
<u-row justify="between" style="width: 100%;">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<span class="ellipsis">{{item[tag]}}</span>
|
<span class="ellipsis">{{item[tag]}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<u-avatar :src="item.avatar || ($cdn + 'common/xztx.png')" mode="square" :size="74"
|
<u-avatar :src="item.avatar || ($cdn + 'common/xztx.png')" mode="square" :size="37"
|
||||||
style="margin: 0 17px;"></u-avatar>
|
style="margin: 0 17px;"></u-avatar>
|
||||||
<span class="ellipsis">{{item["name"]}}</span>
|
<span class="ellipsis">{{item["name"]}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user