mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
修复直播编辑bug
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
style="width: 400px; height: 32px"
|
||||
placeholder="请输入考试名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
@@ -47,7 +47,7 @@
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
maxlength="150"
|
||||
maxlength="364px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,7 +84,7 @@
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style=" width: 388px; height: 32px; border-radius: 8px;overflow: hidden; "
|
||||
style=" width: 364px; height: 32px; border-radius: 8px;overflow: hidden; "
|
||||
v-model:value="inputV2"
|
||||
></a-input-number>
|
||||
|
||||
@@ -102,11 +102,19 @@
|
||||
<span style="margin-right: 3px">授课老师:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV3"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入授课老师"
|
||||
/>
|
||||
|
||||
<a-select
|
||||
v-model:value="value"
|
||||
show-search
|
||||
placeholder="Select a teacher"
|
||||
style="width: 364px"
|
||||
:options="options"
|
||||
:filter-option="filterOption"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@change="handleChange2"
|
||||
></a-select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -177,20 +185,23 @@
|
||||
<span style="margin-right: 3px">评价:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-checkbox v-model:checked="checkedC1" @onclick = 'checkedC1=!checkedC1'>需要评估</a-checkbox>
|
||||
<a-checkbox v-model:checked="checkedC1" @change = "checkRadio">需要评估</a-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="margin-top: -25px">
|
||||
<div class="main_item" style="margin-top: -25px," :style="{ display: checkedC1 ? 'block' : 'none' }">
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<a-select
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 424px"
|
||||
placeholder="选择评估"
|
||||
:options="options1"
|
||||
allowClear
|
||||
showSearch
|
||||
/>
|
||||
v-model:value="value"
|
||||
show-search
|
||||
placeholder="选择评估"
|
||||
style="width: 364px"
|
||||
:options="options"
|
||||
:filter-option="filterOption"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@change="handleChange2"
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -298,6 +309,7 @@ const options1 = ref([
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -528,9 +540,7 @@ export default {
|
||||
message.error(`查询失败`)
|
||||
})
|
||||
};
|
||||
const PlayBack = () => {
|
||||
state.playback = !state.playback;
|
||||
};
|
||||
|
||||
const cloradio1 = (value) => {
|
||||
console.log(value.target._value); //点击的选项
|
||||
if (state.radioV1 === value.target._value) {
|
||||
@@ -635,9 +645,17 @@ export default {
|
||||
if (!regular.test(state.inputV2)) {
|
||||
message.destroy();
|
||||
return message.warning("直播时长需大于0");
|
||||
}
|
||||
const reg = /(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
|
||||
if (!reg.test(state.inputV3)) {
|
||||
message.destroy();
|
||||
return message.warning("请输入有效直播链接地址");
|
||||
}
|
||||
|
||||
if (!state.inputV3) return message.warning("请输入授课老师");
|
||||
if (!reg.test(state.inputV5)) {
|
||||
message.destroy();
|
||||
return message.warning("请输入有效回放地址");
|
||||
}
|
||||
//if (!state.inputV3) return message.warning("请输入授课老师");
|
||||
|
||||
//let check = state.checkedC2 ;
|
||||
let startTime = toDate(
|
||||
@@ -663,9 +681,8 @@ export default {
|
||||
liveId: props.edit?props.EditLiveId:0,
|
||||
liveLink: state.inputV4,
|
||||
liveName: state.inputV1,
|
||||
livePlayback: "",
|
||||
livePlaybackLink: state.inputV5,
|
||||
liveTag: "",
|
||||
livePlayback:state.playback ? "true":"false",
|
||||
livePlaybackLink: state.playback?state.inputV5:"",
|
||||
liveTeacherId: state.inputV3,
|
||||
otherSettings:0, //1或0
|
||||
signOutTime: state.inputV8,
|
||||
@@ -702,12 +719,40 @@ export default {
|
||||
|
||||
};
|
||||
|
||||
|
||||
const options = ref([{
|
||||
value: 'jack',
|
||||
label: 'Jack',
|
||||
}, {
|
||||
value: 'lucy',
|
||||
label: 'Lucy',
|
||||
}, {
|
||||
value: 'tom',
|
||||
label: 'Tom',
|
||||
}]);
|
||||
const handleChange2 = value => {
|
||||
console.log(`selected ${value}`);
|
||||
};
|
||||
const handleBlur = () => {
|
||||
console.log('blur');
|
||||
};
|
||||
const handleFocus = () => {
|
||||
console.log('focus');
|
||||
};
|
||||
const checkRadio = () =>{
|
||||
if(state.checkedC1){
|
||||
state.discussSettings = "true"
|
||||
}else{
|
||||
state.discussSettings = "false";
|
||||
}
|
||||
console.log("state.checkedC1=====",state.discussSettings,state.discussSettings=="true");
|
||||
}
|
||||
const filterOption = (input, option) => {
|
||||
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
PlayBack,
|
||||
options1,
|
||||
// columns1,
|
||||
rowSelection,
|
||||
@@ -715,6 +760,12 @@ export default {
|
||||
handleChange,
|
||||
beforeUpload,
|
||||
updateLiveBroadcast,
|
||||
filterOption,
|
||||
handleBlur,
|
||||
handleFocus,
|
||||
handleChange2,
|
||||
options,
|
||||
checkRadio,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user