Merge branch 'develop' into manage-release

This commit is contained in:
wyx
2023-03-07 17:58:14 +08:00

View File

@@ -29,8 +29,7 @@
<img style="width: 15px; height: 17px" src="../../assets/image/time.png"/>
<div style="margin-left: 8px">
{{
dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + " 至 " +
dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM')
data.planDto?.beginTime + " 至 " + data.planDto?.endTime
}}
</div>
</div>
@@ -39,12 +38,22 @@
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div>
<div class="time" style="margin-top: 37px">
<botton class="btn" style="margin-right: 20px;width: 160px;height: 46px;" v-if="data.hasTask || data.planDto.applyFlag" @click="onLineSignUp(false)" :style="{ background: data.isSignUp || data.isRefused ? '#999' : 'rgb(57, 146, 249)'}">
<botton
class="btn"
style="margin-right: 20px;width: 160px;height: 46px;"
v-if="data.hasTask || data.planDto.applyFlag"
@click="onLineSignUp(false)"
:style="{ background: isAllowSign?data.isSignUp || data.isRefused ? '#999' : 'rgb(57, 146, 249)':'#999'}">
{{
data.isRefused ? '审核拒绝' : data.isSignUp? '已报名' :'立即报名'
}}
</botton>
<botton v-if="data.isRefused" class="btn" style="margin-right: 20px;width: 160px;height: 46px;" @click="onLineSignUp(true)">
<botton
v-if="data.isRefused"
class="btn"
style="margin-right: 20px;width: 160px;height: 46px;"
:style="{ background: isAllowSign?'rgb(57, 146, 249)':'#999'}"
@click="onLineSignUp(true)">
重新报名
</botton>
</div>
@@ -371,8 +380,22 @@ const download = (url) => {
const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!");
};
let timer = null;
//判断能否报名 (TODO-大于面授课截止时间就不能报名了,其余均可以)
function isSignClick() {
let endTime = new Date(data.value.planDto?.endTime).getTime()
let nowTime = new Date().getTime();
if (nowTime < endTime) {
state.isAllowSign = true;
} else {
state.isAllowSign = false;
}
console.log(state.isAllowSign)
}
watch(data,()=>{
isSignClick();
})
// 查看更多-展开回复列表
function lookMore(i) {
@@ -549,6 +572,11 @@ function submitReplayComment() {
// 报名
function onLineSignUp(isAgain) {
if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.warning("未在允许报名时间范围内");
return;
}
if(data.value.isSignUp && !isAgain){
return;
}