修改学生页面信息
This commit is contained in:
parent
2b7eebf412
commit
0ef55038ba
|
@ -13,6 +13,14 @@ export function formatToDateTime(date: dayjs.ConfigType | undefined = undefined,
|
|||
export function formatToDate(date: dayjs.ConfigType | undefined = undefined, format = DATE_FORMAT): string {
|
||||
return dayjs(date).format(format);
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化成小时和分钟
|
||||
* @param date
|
||||
*/
|
||||
export function formatToHourMinute(date: dayjs.ConfigType | undefined = undefined): string {
|
||||
return dayjs(date).format('HHmm');
|
||||
}
|
||||
/**
|
||||
* 计算日期加几天
|
||||
* @param date 计算的日期
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" :labelCol="labelCol" :wrapperCol="wrapperCol" style="font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="24" style="margin-top: 30px;">
|
||||
<div style="margin-left: 60px;margin-bottom: 30px;"> 如果出现应上课未上课的现象,课程名称、授课教师、授课平台等信息与实际不符的情况,请在下面文本框中简单描述后提交,学校将在第一时间处理。</div>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<a-form-item label="错误信息描述" v-bind="validateInfos.errortext">
|
||||
<a-textarea v-model:value="formData.errortext" placeholder="请输入错误信息描述" style="height: 100px;" :disabled="disabled"></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../KcErrorreport.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import { getUserId } from '/@/views/site/utils/index';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: ()=>{} },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
optionsradios: 'erroxsbc',
|
||||
meetingnum: '',
|
||||
meetingpsw: '',
|
||||
meetinglink: '',
|
||||
edittype: '0',
|
||||
ismodified: undefined,
|
||||
skrq: '',
|
||||
sfcj: '0',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
optionsradios: [{ required: true, message: '请输入错误类型!'},],
|
||||
edittype: [{ required: true, message: '请输入修改类型!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add(record) {
|
||||
console.log(`🚀 ~ file: KcErrorreportIndexForm.vue:114 ~ add ~ record:`, record)
|
||||
var param = {kechengbiaoid:record.kechengbiaoid,userid:getUserId()}
|
||||
edit(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log(`🚀 ~ file: KcErrorreportIndexForm.vue:107 ~ edit ~ record:`, record)
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
console.log(`🚀 ~ file: KcErrorreportIndexForm.vue:112 ~ nextTick ~ formData:`, formData)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
model.subper = userStore?.getUserInfo?.realname
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 500px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<a-modal :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<template #title>
|
||||
<div style="text-align: center;font-size: 22px;">{{title}}</div>
|
||||
</template>
|
||||
<KcErrorreportForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcErrorreportForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import KcErrorreportForm from './KcErrorreportIndexStuForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add(record) {
|
||||
title.value = '错误报告提交';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -1,92 +1,236 @@
|
|||
<template>
|
||||
<div class="indexBackClass">
|
||||
<div style="margin-top: 20px;">
|
||||
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">今日课表</span>
|
||||
<span style="margin-left: 30px;color: #1c84c6;font-weight: 600;">{{sjtime}} {{ sjtitle }}</span>
|
||||
<div style="margin-top: 20px">
|
||||
<span style="margin-left: 30px; font-size: 24px; font-weight: 600">今日课表</span>
|
||||
<span style="margin-left: 30px; color: #1c84c6; font-weight: 600">{{ sjtime }} {{ sjtitle }}</span>
|
||||
</div>
|
||||
<a-divider></a-divider>
|
||||
<div>
|
||||
<a-row :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 12 }" :lg="{ span: 6 }" v-for="(item, index) in listData"
|
||||
:key="index" style="padding: 20px;">
|
||||
<div style="border: 2px #eef1f2 solid;">
|
||||
<div>
|
||||
<div class="jtkcTitleClass">已上课程</div>
|
||||
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 15px;font-weight: 600;font-size: 16px; color: #a50a0a;">
|
||||
第<span>{{ item.hh }}</span>节
|
||||
<a-row :gutter="[16, 16]">
|
||||
<template v-for="(item, index) in listData" :key="index">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 12 }" :lg="{ span: 6 }" style="padding: 20px" v-if="zzskFun(item) == '3' || zzskFun(item) == '2'">
|
||||
<div style="border: 2px #eef1f2 solid">
|
||||
<div>
|
||||
<div class="jtkcZzskTitleClass" v-if="zzskFun(item) == '2'">正在上课</div>
|
||||
<div class="jtkcDskcTitleClass" v-else>待上课程</div>
|
||||
<div
|
||||
style="
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
padding: 15px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: #a50a0a;
|
||||
"
|
||||
>
|
||||
第<span>{{ item.hh }}</span>节
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px; color: #eef1f2" />
|
||||
<div style="padding: 20px; font-weight: 600">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; max-width: 75%; color: #0e6393; float: left">
|
||||
{{item.kcmc}}</div>
|
||||
<div style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; float: right">{{ item.skjs }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="item.skxs == '1'">
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width: 100%; text-align: center; line-height: 60px"> ————线下上课地点———— </div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;margin-top: 20px;">
|
||||
<div style="text-align: center; margin-top: 6px">
|
||||
<a-button class="yyClass" type="primary" @click="kssk(item)">上课</a-button>
|
||||
<a-button class="yyClass" type="primary" @click="baocuoFun(item)" style="margin-left: 15px">报错</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="item.skxs == '0'">
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width: 100%; text-align: center; line-height: 60px"> ————授课平台信息———— </div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
授课平台:{{ item.zbfs }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
密码:{{ item.hymm }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;margin-top: 20px;">
|
||||
<div style="text-align: center; margin-top: 6px">
|
||||
<a-button class="yyClass" type="primary" @click="kssk(item)">上课</a-button>
|
||||
<a-button class="yyClass" type="primary" @click="baocuoFun(item)" style="margin-left: 15px">报错</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="item.skxs == '2'">
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width: 100%; text-align: center; line-height: 60px"> ————授课平台信息———— </div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
授课平台:{{ item.zbfs }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
密码:{{ item.hymm }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
线下上课地点:{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;margin-top: 20px;">
|
||||
<div style="text-align: center; margin-top: 6px">
|
||||
<a-button class="yyClass" type="primary" @click="kssk(item)">上课</a-button>
|
||||
<a-button class="yyClass" type="primary" @click="baocuoFun(item)" style="margin-left: 15px">报错</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px;color: #eef1f2;" />
|
||||
<div style="padding: 20px;font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="font-size: 16px;margin-top: 0px; padding: 0px; height: 45px;max-width:75%;color:#0e6393;float: left;">{{ item.kcmc }}</div>
|
||||
<div style="font-size: 16px;margin-top: 0px; padding: 0px; height: 45px;float: right;">{{ item.skjs }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div>评价:</div>
|
||||
<div>
|
||||
<span>
|
||||
<a-rate v-model:value="item.pjxj" :tooltips="desc" @change="pingfenCli(item)" style="color: #b17215;"/>
|
||||
<span class="ant-rate-text">{{ desc[item.pjxj - 1] }}</span>
|
||||
</span>
|
||||
</a-col>
|
||||
</template>
|
||||
<a-col :span="24">
|
||||
<a-divider></a-divider>
|
||||
</a-col>
|
||||
<template v-for="(item, index) in listData" :key="index">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 12 }" :lg="{ span: 6 }" style="padding: 20px" v-if="zzskFun(item) == '1'">
|
||||
<div style="border: 2px #eef1f2 solid">
|
||||
<div>
|
||||
<div class="jtkcTitleClass">已上课程</div>
|
||||
<div style=" width: 100%; white-space: normal; word-break: break-all; overflow: hidden; padding: 15px; font-weight: 600; font-size: 16px; color: #a50a0a; " >
|
||||
第<span>{{ item.hh }}</span>节
|
||||
</div>
|
||||
<div v-show="item.pjxj">
|
||||
<div style="margin-top: 6px;">
|
||||
<a-textarea placeholder="请填写评价信息" v-model:value="item.textdeail" style="height: 80px;"></a-textarea>
|
||||
</div>
|
||||
<div style="margin-top: 6px;">
|
||||
<a-checkbox v-model:value="item.nmtj">匿名提交</a-checkbox>
|
||||
</div>
|
||||
<div style="text-align: center;margin-top: 6px;">
|
||||
<a-button class="yyClass" type="primary" @click="qxtjxx(item)">取消</a-button>
|
||||
<a-button class="yyClass" type="primary" @click="tjpjxxFun(item)" style="margin-left: 15px;">提交</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div :id="item.id+`xs`" style="float:right;margin-top:20px;font-size: 12px;font-weight: 1;color:#0e6393;" @click="item.xqxx=true" v-show="!item.xqxx">查看详情</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div v-show="item.xqxx">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width:100%;text-align: center;line-height: 60px;">
|
||||
————线下上课地点————
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px;">
|
||||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="float:right;font-size: 12px;font-weight: 1;color:#0e6393;" @click="item.xqxx=false">收起详情</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</div>
|
||||
<a-divider style="margin: 0px; color: #eef1f2" />
|
||||
<div style="padding: 20px; font-weight: 600">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; max-width: 75%; color: #0e6393; float: left">{{
|
||||
item.kcmc
|
||||
}}</div>
|
||||
<div style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; float: right">{{ item.skjs }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div>评价:</div>
|
||||
<div>
|
||||
<span>
|
||||
<a-rate v-model:value="item.pjxj" :tooltips="desc" @change="pingfenCli(item)" style="color: #b17215" />
|
||||
<span class="ant-rate-text">{{ desc[item.pjxj - 1] }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-show="item.pjxj">
|
||||
<div style="margin-top: 6px">
|
||||
<a-textarea placeholder="请填写评价信息" v-model:value="item.textdeail" style="height: 80px"></a-textarea>
|
||||
</div>
|
||||
<div style="margin-top: 6px">
|
||||
<a-checkbox v-model:value="item.nmtj">匿名提交</a-checkbox>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 6px">
|
||||
<a-button class="yyClass" type="primary" @click="qxtjxx(item)">取消</a-button>
|
||||
<a-button class="yyClass" type="primary" @click="tjpjxxFun(item)" style="margin-left: 15px">提交</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div
|
||||
:id="item.id + `xs`"
|
||||
style="float: right; margin-top: 20px; font-size: 12px; font-weight: 1; color: #0e6393"
|
||||
@click="item.xqxx = true"
|
||||
v-show="!item.xqxx"
|
||||
>查看详情</div
|
||||
>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div v-show="item.xqxx">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width: 100%; text-align: center; line-height: 60px"> ————线下上课地点———— </div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="line-height: 15px">
|
||||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="float: right; font-size: 12px; font-weight: 1; color: #0e6393" @click="item.xqxx = false">收起详情</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
</a-row>
|
||||
</div>
|
||||
<!-- 报错列表 -->
|
||||
<KcErrorreportIndexStuModal ref="kcErrorreportIndexStuModal"></KcErrorreportIndexStuModal>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onMounted } from 'vue';
|
||||
import { dateUtil, formatToDate,formatToWeekOne,formatAddDate } from '/@/utils/dateUtil';
|
||||
import { ref, reactive, computed, onMounted, createVNode,h } from 'vue';
|
||||
import { dateUtil, formatToDate, formatToWeekOne, formatAddDate, formatToHourMinute } from '/@/utils/dateUtil';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { getUserId } from '/@/views/site/utils/index';
|
||||
import { message,Modal } from 'ant-design-vue';
|
||||
import KcErrorreportIndexStuModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexStuModal.vue'
|
||||
|
||||
|
||||
let listData = ref<any>([]);
|
||||
let listData = ref<any>([]);
|
||||
let sjtime = ref<any>('');
|
||||
let sjtitle = ref<any>('');
|
||||
const desc = ref<string[]>(['1分 没有收获', '2分 收获很少', '3分 收获一般', '4分 收获较大', '5分 收获很大']);
|
||||
|
||||
const kcErrorreportIndexStuModal = ref();
|
||||
|
||||
/**
|
||||
* 判断上课类型
|
||||
* @param item
|
||||
*/
|
||||
function zzskFun(item: any) {
|
||||
let dqsj = formatToHourMinute(new Date());
|
||||
let kssj = item.hhks;
|
||||
let jssj = item.hhjs;
|
||||
let retStr = '';
|
||||
console.log(`🚀 ~ file: index.vue:142 ~ zzskFun ~ 1111:`, dqsj, kssj, jssj);
|
||||
if (dqsj < kssj) {
|
||||
//已上课程
|
||||
retStr = '3';
|
||||
} else if (dqsj >= kssj && dqsj <= jssj) {
|
||||
//正在上课
|
||||
retStr = '2';
|
||||
} else if (dqsj > jssj) {
|
||||
//待上课程
|
||||
retStr = '1';
|
||||
}
|
||||
console.log(`🚀 ~ file: index.vue:151 ~ zzskFun ~ retStr:`, retStr);
|
||||
return retStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
|
@ -95,22 +239,61 @@ const desc = ref<string[]>(['1分 没有收获', '2分 收获很少', '3分 收
|
|||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getStudentKclblist', params });
|
||||
const save = (params) => defHttp.post({ url: '/ktgl/kcKetangbiao/add', params });
|
||||
|
||||
function pingfenCli(item){
|
||||
console.log(`🚀 ~ file: index.vue:108 ~ pingfenCli ~ item:`, item)
|
||||
item.nmtj = 1
|
||||
function pingfenCli(item) {
|
||||
console.log(`🚀 ~ file: index.vue:108 ~ pingfenCli ~ item:`, item);
|
||||
item.nmtj = 1;
|
||||
}
|
||||
/**
|
||||
* 取消提交信息
|
||||
*/
|
||||
function qxtjxx(item){
|
||||
item.pjxj = null
|
||||
function qxtjxx(item) {
|
||||
item.pjxj = null;
|
||||
}
|
||||
/**
|
||||
* 开始上课
|
||||
* @param item
|
||||
*/
|
||||
function kssk(item){
|
||||
console.log(`🚀 ~ file: index.vue:252 ~ kssk ~ item:`, item.skxs)
|
||||
if(item.skxs == 0){//线下
|
||||
message.success({
|
||||
content: () => item.skdd,
|
||||
class: 'custom-class',
|
||||
style: {
|
||||
marginTop: '20vh',
|
||||
},
|
||||
});
|
||||
}else if(item.skxs == 1 || item.skxs == 2){//线上
|
||||
if(item.kclj){
|
||||
window.open(item.kclj,"_block")
|
||||
}else{
|
||||
Modal.success({
|
||||
icon: createVNode({}),
|
||||
content: h('div', {style:'height:150px;'}, [
|
||||
h('p',{style:'font-size:36px;font-weight:600;color:black;text-align:center;'}, '听课链接错误'),
|
||||
h('p',{style:'font-size:14px;font-weight:600;color:black;'}, ' 该课程听课链接错误,系统已自动通知管理员,给您带来不便请谅解。'),
|
||||
]),
|
||||
okText: 'OK',
|
||||
width:'500px',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 报错
|
||||
* @param item
|
||||
*/
|
||||
function baocuoFun(item){
|
||||
kcErrorreportIndexStuModal.value.disableSubmit = false;
|
||||
kcErrorreportIndexStuModal.value.add(item);
|
||||
|
||||
}
|
||||
|
||||
function tjpjxxFun(item){
|
||||
console.log(`🚀 ~ file: index.vue:123 ~ tjpjxxFun ~ item:`, item)
|
||||
let ketangbiaoid = item.ketangbiaoid
|
||||
function tjpjxxFun(item) {
|
||||
console.log(`🚀 ~ file: index.vue:123 ~ tjpjxxFun ~ item:`, item);
|
||||
let ketangbiaoid = item.ketangbiaoid;
|
||||
let sid = getUserId();
|
||||
let sname = "";
|
||||
let sname = '';
|
||||
let textdeail = item.textdeail;
|
||||
let sfnm = item.nmtj;
|
||||
let stars = item.pjxj;
|
||||
|
@ -118,44 +301,69 @@ console.log(`🚀 ~ file: index.vue:123 ~ tjpjxxFun ~ item:`, item)
|
|||
// save({ ketangbiaoid,sid,sname,textdeail,sfnm,stars}).then(res => {
|
||||
// console.log(`🚀 ~ file: index.vue:83 ~ list ~ res:`, res)
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// let startTime = formatAddDate(new Date(),1);
|
||||
let skrq = formatAddDate(new Date(),8);
|
||||
sjtime.value = skrq
|
||||
let skrq = formatAddDate(new Date(), 8);
|
||||
sjtime.value = skrq;
|
||||
sjtitle.value = formatToWeekOne(new Date());
|
||||
list({ skrq,xh:getUserId() }).then(res => {
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ list ~ res:`, res)
|
||||
list({ skrq, xh: getUserId() }).then((res) => {
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ list ~ res:`, res);
|
||||
listData.value = res?.records;
|
||||
console.log(`🚀 ~ file: index.vue:85 ~ list ~ listData.value:`, listData.value)
|
||||
console.log(`🚀 ~ file: index.vue:85 ~ list ~ listData.value:`, listData.value);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.indexBackClass{
|
||||
.indexBackClass {
|
||||
background: #fff;
|
||||
}
|
||||
.yyyClass{
|
||||
background: #6cafda;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
.yyyClass {
|
||||
background: #6cafda;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
line-height: 23px;
|
||||
}
|
||||
.yyClass{
|
||||
background-color: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
.yyClass {
|
||||
background-color: #1c84c6;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
line-height: 23px;
|
||||
}
|
||||
.bcClass{
|
||||
background-color: #1c84c6;font-weight: 600;border-radius: 5px;line-height: 23px;
|
||||
.bcClass {
|
||||
background-color: #1c84c6;
|
||||
font-weight: 600;
|
||||
border-radius: 5px;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
.jtkcTitleClass{
|
||||
background-image: linear-gradient(to right ,rgba(10,10,10,0.42), rgba(158,166,185,0.57));
|
||||
.jtkcTitleClass {
|
||||
background-image: linear-gradient(to right, rgba(10, 10, 10, 0.42), rgba(158, 166, 185, 0.57));
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
padding: 3px 0 0 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.ant-rate-star{
|
||||
|
||||
.jtkcZzskTitleClass {
|
||||
background-image: linear-gradient(to right , #5c2daa, #a27ae8);
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
padding: 3px 0 0 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.jtkcDskcTitleClass {
|
||||
background-image: linear-gradient(to right, #1ab394, #8adbc9);
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
padding: 3px 0 0 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.ant-rate-star {
|
||||
margin-right: 0px;
|
||||
}
|
||||
</style>
|
|
@ -10,16 +10,20 @@ export const projectName = import.meta.env.VITE_GLOB_APP_TITLE;
|
|||
/**
|
||||
* 是否开启单点登录
|
||||
*/
|
||||
export const isOpenSSO = import.meta.env.VITE_GLOB_APP_OPEN_SSO;
|
||||
export const isOpenSSO = import.meta.env.VITE_GLOB_APP_OPEN_SSO == 'true'?true:false;
|
||||
|
||||
export const getUserId = () => {
|
||||
console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO:`, isOpenSSO)
|
||||
if(isOpenSSO){
|
||||
console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO1:`, isOpenSSO)
|
||||
const { userInfo } = useUserStore();
|
||||
//正常取用户
|
||||
return userInfo?.username;
|
||||
}else{
|
||||
console.log(`🚀 ~ file: index.ts:17 ~ getUserId ~ isOpenSSO2:`, isOpenSSO)
|
||||
//固定某值
|
||||
return '2016900057';
|
||||
// return '2016900057';//教师
|
||||
return '2022010920';//学生
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue