Browse Source

update 修改内容&样式

pull/5/head
Wangwei 1 year ago
parent
commit
463df93806
  1. 2
      src/components/Header.vue
  2. 263
      src/views/class/admin/schedule_admin_class.vue
  3. 4
      src/views/class/class_lesson.vue
  4. 6
      src/views/studypath/jiandaoyun.vue

2
src/components/Header.vue

@ -14,7 +14,7 @@
<div class="navlf_item navlf-item-box">
<a href="https://home.fanruan.com/" class="nav-item">首页</a>
<a href="https://service.fanuan.com" class="nav-item">服务平台</a>
<a href="https://service.fanruan.com" class="nav-item">服务平台</a>
<a href="https://help.fanruan.com/" class="nav-item">文档</a>
<a href="https://edu.fanruan.com/" class="nav-item active">学院</a>
<a href="https://bbs.fanruan.com/wenda" class="nav-item">问答</a>

263
src/views/class/admin/schedule_admin_class.vue

@ -1,56 +1,37 @@
<template>
<div>
<el-table v-loading="loading" :data="tableData" style="width: 100%"
@selection-change="handleSelectionChange" row-key="id" default-expand-all lazy
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table v-loading="loading" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange" row-key="id" default-expand-all lazy :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column prop="title" label="目录大纲">
<template #default='scope'>
<span v-if="scope.row.children" class="f18 fw600 col333">{{scope.row.title}}</span>
<a v-else :href="'/class/play/'+classid+'/'+scope.row.id" target="_blank" class="item-pl f15">
<i class="iconfont icon-bofang2 colb3c f14 mrt10"></i>{{scope.row.title}}
</a>
<template #default="scope">
<span v-if="scope.row.children" class="f18 fw600 col333">{{ scope.row.title }}</span>
<a v-else :href="'/class/play/' + classid + '/' + scope.row.id" target="_blank" class="item-pl f15"> <i class="iconfont icon-bofang2 colb3c f14 mrt10"></i>{{ scope.row.title }} </a>
</template>
</el-table-column>
<el-table-column fixed="right" label="发布状态" width="100">
<template #default="scope">
<el-switch v-if="!scope.row.children" v-model="scope.row.display" :active-value="1"
:inactive-value="0" active-color="#0082fc" inactive-color="#dadde5"
@click="handleClose(scope.row)">
</el-switch>
<el-switch v-if="!scope.row.children" v-model="scope.row.display" :active-value="1" :inactive-value="0" active-color="#0082fc" inactive-color="#dadde5" @click="handleClose(scope.row)"> </el-switch>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { useRoute } from 'vue-router'
import { scheduleList, noticeAdd, noticeEdit, scheduleUpdate, studyLog } from "@/api/study_admin";
import { ref, toRefs, reactive, getCurrentInstance, nextTick } from 'vue';
import store from '@/store'
import { _debounce } from "@/utils/debounce";
export default {
name: 'class_homework',
import { useRoute } from "vue-router";
import { scheduleList, noticeAdd, noticeEdit, scheduleUpdate, studyLog } from "@/api/study_admin";
import { ref, toRefs, reactive, getCurrentInstance, nextTick } from "vue";
import store from "@/store";
import { _debounce } from "@/utils/debounce";
export default {
name: "class_homework",
setup() {
const { proxy } = getCurrentInstance()
const route = useRoute()
const { proxy } = getCurrentInstance();
const route = useRoute();
const classid = route.params.classid;
const state = reactive({
headers: {
'authentication': store.getters.get_authentication
authentication: store.getters.get_authentication,
},
loading: true,
tableData: [], //
@ -58,89 +39,84 @@
total: 0, //
page: 1, //
perpage: 10, //
id: '',
kw: '',
id: "",
kw: "",
dialogFormVisible: false,
dialogEdit: false,
dialogUidLog: false,
numbereRef: {
title: '',
url: '',
title: "",
url: "",
},
rules: {
title: [
{ required: true, message: '请输入公告内容', trigger: 'blur' },
],
url: [
{ required: true, type: "url", message: '请输入正确的url', trigger: 'blur' },
],
title: [{ required: true, message: "请输入公告内容", trigger: "blur" }],
url: [{ required: true, type: "url", message: "请输入正确的url", trigger: "blur" }],
},
rowStudent: {},
modEdit: {
id: '',
xs_name: '',
gongsi: '',
gangwei: '',
shouji: '',
fenshu: '',
beizhu: '',
id: "",
xs_name: "",
gongsi: "",
gangwei: "",
shouji: "",
fenshu: "",
beizhu: "",
},
uidLog: [],
alltime: '',
username: '',
})
alltime: "",
username: "",
});
//
const getnotice = async () => {
state.loading = true
state.loading = true;
const res = await scheduleList(classid);
if (res.code === 200) {
state.tableData = res.data
state.total = res.data.total
state.page = res.data.current_page
state.loading = false
state.tableData = res.data;
state.total = res.data.total;
state.page = res.data.current_page;
state.loading = false;
}
};
getnotice();
//
const getUserLog = async (uid) => {
state.loading = true
state.loading = true;
const res = await studyLog(classid, uid);
if (res.code === 200) {
state.uidLog = res.data.data;
state.alltime = res.data.alltime;
state.username = res.data.username;
state.dialogUidLog = true;
state.loading = false
state.loading = false;
}
};
// item
const setItem = (item) => {
state.item = item
state.isShowItem = true
}
state.item = item;
state.isShowItem = true;
};
const handleOption = () => {
state.page = 1
getnotice()
}
state.page = 1;
getnotice();
};
//
const handleSelectionChange = (val) => {
state.multipleSelection = val
}
state.multipleSelection = val;
};
const changePage = (val) => {
state.page = val
getnotice()
}
state.page = val;
getnotice();
};
//
const handleSizeChange = (val) => {
state.perpage = val
getnotice()
}
state.perpage = val;
getnotice();
};
//
const handleClose = async (row) => {
@ -149,38 +125,38 @@
id: row.id,
display: row.display,
title: row.title,
}
}
},
};
const res = await scheduleUpdate(classid, params);
if (res.message === 'success') {
if (res.message === "success") {
if (res.data.display == 1) {
proxy.$notify({
title: '发布成功',
type: 'success',
message: res.data.title + '【发布成功】',
title: "发布成功",
type: "success",
iconClass: "schedule-success",
message: res.data.title + "【发布成功】",
});
} else {
proxy.$notify.info({
title: '取消发布成功',
message: res.data.title + '【已取消发布】',
title: "取消发布成功",
type: "info",
iconClass: "schedule-info",
message: res.data.title + "【已取消发布】",
});
}
} else {
proxy.$message({
type: 'error',
message: '服务器错误',
center: true
type: "error",
message: "服务器错误",
center: true,
});
}
};
//
const submitForm = _debounce(() => {
_submitForm();
}, 300)
}, 300);
const numberValidateRef = ref(null);
const _submitForm = () => {
nextTick(() => {
@ -189,23 +165,23 @@
const params = {
title: state.numbereRef.title,
url: state.numbereRef.url,
}
const res = await noticeAdd(classid, params)
if (res.message === 'success') {
};
const res = await noticeAdd(classid, params);
if (res.message === "success") {
state.dialogFormVisible = false;
proxy.$message({
type: 'success',
message: '添加成功',
center: true
type: "success",
message: "添加成功",
center: true,
});
setTimeout(function () {
getnotice()
setTimeout(function() {
getnotice();
}, 100);
}
}
});
})
}
});
};
const noticeValidateRef = ref(null);
const resnoticeEdit = () => {
@ -213,30 +189,29 @@
if (valid) {
const params = {
data: state.modEdit,
}
};
const res = await noticeEdit(classid, params);
if (res.code === 200) {
state.dialogEdit = false;
proxy.$message({
type: 'success',
message: '编辑成功',
center: true
type: "success",
message: "编辑成功",
center: true,
});
getnotice()
getnotice();
}
}
});
}
};
const openStudent = (row) => {
state.modEdit = row;
state.dialogEdit = true;
}
};
const eidtForm = () => {
resnoticeEdit();
}
};
// const tableRowClassName = ({ row }) => {
// if (row.children) {
@ -262,28 +237,28 @@
getUserLog,
noticeValidateRef,
//tableRowClassName
}
}
}
};
},
};
</script>
<style lang="scss" scoped>
.item-pl:hover{
.icon-bofang2{
.item-pl:hover {
.icon-bofang2 {
color: #0082fc;
}
}
.item_log {
}
.item_log {
width: 120px;
display: inline-block;
text-align: right;
}
}
.tab-header {
.tab-header {
padding: 24px 0 10px 0;
}
}
.ptlist {
.ptlist {
padding: 6px 0;
overflow-y: auto;
font-size: 14px;
@ -291,49 +266,55 @@
li {
padding: 2px 0;
}
}
}
.ifprt {
.ifprt {
padding-right: 10px !important;
}
}
.infobox {
.infobox {
line-height: 24px;
padding: 0 20px;
}
}
.scrollbar {
.scrollbar {
height: 106px;
overflow: hidden;
}
}
.min-pd {
.min-pd {
padding: 6px 10px;
}
}
::v-deep .el-scrollbar__wrap {
::v-deep .el-scrollbar__wrap {
max-height: 300px;
overflow-x: hidden;
}
}
::v-deep .el-icon-close {
::v-deep .el-icon-close {
display: none !important;
}
}
::v-deep .el-icon-close-tip {
::v-deep .el-icon-close-tip {
display: none !important;
}
}
::v-deep .el-button i {
::v-deep .el-button i {
line-height: 0;
}
}
</style>
<style>
.el-dialog__body {
.el-dialog__body {
padding: 20px 30px 30px 30px;
}
/* .title-row td{
}
.schedule-success {
color: #67c23a !important;
}
.schedule-info {
color: #909399 !important;
}
/* .title-row td{
background-color:#F3F8FF;
} */
</style>

4
src/views/class/class_lesson.vue

@ -18,6 +18,10 @@
<template #default>
<div class="lesson">
<el-empty :image-size="150" description=" " v-if="lessonList.length === 0">
<div class="col617">等待老师发布...</div>
</el-empty>
<div class="looplist" v-for="(item, i) in lessonList" :key="i">
<div class="otile flex-1">
<h2>{{ item.title }}</h2>

6
src/views/studypath/jiandaoyun.vue

@ -230,7 +230,7 @@
<div class="infobox">
<div class="f24 col333">简道云学习班从入门到精通·实战班</div>
<div class="f16 col617" style="margin: 10px 0 20px;">
5周体系化课程 助力你成为全公司最会用简道云的人
3周体系化课程 助力你成为全公司最会用简道云的人
</div>
<div class="icoxbox flex-6">
<li>
@ -252,7 +252,7 @@
<div class="flex-1 m_kaike" style="margin-top: 30px;" v-if="is_showclass === true">
<a href="https://bbs.fanruan.com/course/jiandaoyun/standard/?sqtj" target="_blank" class="btn-jdy f14" style=" width: 278px; padding: 10px 0; margin-right: 20px;"> 了解详情{{ start_day }}开课 </a>
<div class="f14 col617 flex-1">
<span>课时5</span> <span style="margin: -2px 4px 0 4px;"></span>
<span>课时3</span> <span style="margin: -2px 4px 0 4px;"></span>
<span>{{ people_count }}人已完成学习</span>
</div>
</div>
@ -260,7 +260,7 @@
<div class="flex-1 m_kaike" style="margin-top: 30px;" v-if="is_showclass === false">
<span class="btn-ddd f14" style=" width: 278px; padding: 10px 0; margin-right: 20px;">暂无开课计划</span>
<div class="f14 col617 flex-1">
<span>课时5</span> <span style="margin: -2px 4px 0 4px;"></span>
<span>课时3</span> <span style="margin: -2px 4px 0 4px;"></span>
<span>{{ people_count }}人已完成学习</span>
</div>
</div>

Loading…
Cancel
Save