mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
--fix 持续时间为非必填
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<span style="margin-right: 3px">持续时间:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input-number :min="0" :max="999999" :precision="0" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
<a-input-number :min="0" :max="999999" :precision="0" style="width: 400px; height: 40px; border-radius: 8px" :placeholder="durationText"
|
||||
v-model:value="formData.activityDuration" />
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineEmits, defineProps, ref } from "vue";
|
||||
import {computed, defineEmits, defineProps, ref} from "vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
import {useResetRef} from "@/utils/useCommon";
|
||||
@@ -197,6 +197,7 @@ const rulesRef = ref({
|
||||
});
|
||||
|
||||
const { validate } = Form.useForm(formData, rulesRef);
|
||||
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<span style="margin-right: 3px">持续时间:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input-number :min="0" :max="999999" :precision="0" style="width: 400px; height: 40px; border-radius: 8px"
|
||||
<a-input-number :min="0" :max="999999" :precision="0" style="width: 400px; height: 40px; border-radius: 8px" :placeholder="durationText"
|
||||
v-model:value="formData.liveDuration"></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -220,7 +220,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineEmits, defineProps, ref } from "vue";
|
||||
import {computed, defineEmits, defineProps, ref} from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import AddInvistRoot from "@/components/drawers/AddInvistRoot.vue";
|
||||
@@ -324,6 +324,7 @@ const rulesRef = ref({
|
||||
});
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
||||
|
||||
const closeDrawer = () => {
|
||||
imageUrl.value = "";
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
:min="0"
|
||||
:max="999999"
|
||||
:precision="0"
|
||||
placeholder="请输入持续时间"
|
||||
:placeholder="durationText"
|
||||
style="
|
||||
width: 88%;
|
||||
height: 32px;
|
||||
@@ -366,7 +366,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineProps, ref, nextTick} from "vue";
|
||||
import {defineProps, ref, nextTick, computed} from "vue";
|
||||
import {Form, message} from "ant-design-vue";
|
||||
import FJUpload from "@/components/common/FJUpload";
|
||||
import CheckBox from "@/components/common/CheckBox";
|
||||
@@ -523,7 +523,7 @@ const formDataRule = {
|
||||
// ],
|
||||
};
|
||||
const { validate } = Form.useForm(formData, formDataRule);
|
||||
|
||||
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
||||
function timeChange(time, timeStr) {
|
||||
formData.value.beginTime = timeStr[0];
|
||||
formData.value.endTime = timeStr[1];
|
||||
|
||||
@@ -970,7 +970,7 @@
|
||||
:min="0"
|
||||
:max="999999"
|
||||
:precision="0"
|
||||
placeholder="请输入持续时间"
|
||||
:placeholder="durationText"
|
||||
style="
|
||||
width: 88%;
|
||||
height: 32px;
|
||||
@@ -1766,6 +1766,7 @@ import { useStore } from "vuex";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
import { checkPer, checkOwner } from "@/utils/utils";
|
||||
import dayjs from "dayjs";
|
||||
import {duration} from "moment";
|
||||
|
||||
//列表表格
|
||||
|
||||
@@ -2184,6 +2185,7 @@ export default defineComponent({
|
||||
const CourseModalRef = ref(null);
|
||||
const store = useStore();
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
const durationText = computed(() => state.xjkkinputV3?.length?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute'):'请输入持续时间');
|
||||
|
||||
const state = reactive({
|
||||
permissions:null,
|
||||
@@ -4946,6 +4948,7 @@ export default defineComponent({
|
||||
ft_exit_0,
|
||||
om_exit,
|
||||
ckxq_hs,
|
||||
durationText,
|
||||
ftsr_exit,
|
||||
stm_exit,
|
||||
ft_exit_see,
|
||||
|
||||
Reference in New Issue
Block a user