新增课程修改

dev_202412
yujialong 2 months ago
parent f2b6fb204f
commit 9dd6f20a62
  1. 2
      src/components/Sidebar.vue
  2. 8
      src/router/index.js
  3. 2
      src/views/Home.vue
  4. 3
      src/views/Login.vue
  5. 2
      src/views/course/AddCurriculum.vue
  6. 204
      src/views/course/AddLink.vue
  7. 23
      src/views/course/Curriculum.vue
  8. 1073
      src/views/course/add/index.vue
  9. 973
      src/views/course/add/step1.vue
  10. 200
      src/views/course/add/step2.vue
  11. 202
      src/views/course/add/step3.vue
  12. 56
      src/views/course/add/step4.vue
  13. 4
      src/views/course/contentSettings.vue
  14. 4
      src/views/customer/AddCustomer.vue
  15. 2
      src/views/match/add/step1.vue
  16. 2
      src/views/match/add/step3.vue
  17. 2
      src/views/match/manage/matchRank.vue
  18. 2
      src/views/shop/add.vue
  19. 2
      src/views/shop/list.vue
  20. 246
      src/views/system/addLog.vue
  21. 280
      src/views/system/manageLog.vue
  22. 5
      src/views/theoreticalCourse/contentSettings/index.vue
  23. 2
      src/views/user/AddUser.vue

@ -1,7 +1,7 @@
<template>
<div class="sidebar">
<el-menu :default-active="active" :default-openeds="['1', '2', '3', '4']" background-color="#fff" text-color="#333"
active-text-color="#062c87" :collapse="collapse" :collapse-transition="false" router @select="menuSelect">
active-text-color="#062c87" router>
<template v-for="item in menus">
<template v-if="item.children">
<el-submenu :index="item.index" :key="item.index">

@ -86,12 +86,12 @@ let router = new Router({
component: () => import('../views/course/AddCurriculum.vue'),
},
{
path: '/contentSettings',
component: () => import('../views/course/contentSettings.vue'),
path: '/curriculum/add',
component: () => import('../views/course/add'),
},
{
path: '/addlink',
component: () => import('../views/course/AddLink.vue'),
path: '/contentSettings',
component: () => import('../views/course/contentSettings.vue'),
},
{
path: '/data',

@ -8,7 +8,7 @@
<transition name="move" mode="out-in">
<router-view></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
<el-backtop target=".content-box"></el-backtop>
</div>
</div>
</div>

@ -271,7 +271,8 @@ export default {
this.$store.commit('setDataPer', res.dataPermissionList)
this.$message.success('登录成功!')
this.$router.push({
path: list[0].children[0].path
// path: list[0].children[0].path
path: '/workbench'
});
localStorage.setItem('ms_username', this.param.username);
} catch (e) {

@ -1043,7 +1043,7 @@ $avatar-width: 104px;
&.active,
&:hover {
color: #9076ff;
color: #062c87;
}
span {

@ -1,204 +0,0 @@
<template>
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" @click="goback()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">添加环节</span>
</div>
<div>
<el-button type="primary" round class="mag" @click="saveAdd('form')">确定
</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20 user_header">
<div class="flex-center">
<p class="addhr_tag"></p>
<span>环节1.1</span>
</div>
<el-button type="primary" round class="mag" @click="addcourse()">添加环节</el-button>
</div>
<div>
<el-form :model="form" ref="form" label-width="120px" class="courseware">
<ul class="mgb20">
<li v-for="(item,index) in form.courseList" :key="index" class="flex-between">
<div style="width: 50%;">
<el-form-item label="环节名称" :prop="'courseList.' + index + '.linkName'"
:rules="{required: true, message: '请输入项目课件', trigger: 'blur'}">
<el-input placeholder="请输入项目课件" v-model="item.linkName"></el-input>
</el-form-item>
<el-form-item label="资源添加" :prop="'courseList.' + index + '.fileLink'"
:rules="{required: true, message: '请添加文件', trigger: 'blur'}">
<el-upload
class="link_upload"
:headers="{token}"
:action="api.uploadFiles"
:on-remove="(file, fileList)=>{return handleRemove(file, fileList, index)}"
:on-error="uploadError"
:on-success="(response, file, fileList)=>{return uploadSuccess(response, file, fileList, index)}"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:file-list="item.uploadList">
<el-button size="medium" type="primary" icon="el-icon-upload"
class="uploadTitle">点击上传
</el-button>
</el-upload>
</el-form-item>
</div>
<div>
<el-button size="medium" type="primary" @click="delCourse(index)">删除课件
</el-button>
</div>
</li>
</ul>
</el-form>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
token: this.$store.state.loginToken,
form: {
courseList: [{
projectId: this.$store.state.systemId,
courseId: this.$store.state.courseId,
linkName: "",
fileLink: "",
uploadList: []
}]
}
};
},
mounted() {
this.getData();
},
methods: {
getData() {
let data = {
projectId: this.form.courseList[0].projectId,
courseId: this.form.courseList[0].courseId
};
this.$get(this.api.queryLinkDetails, data).then((res) => {
res.message.map(e => {
var arr = [];
arr.push({ name: e.linkName, url: e.fileLink });
this.$set(e, "uploadList", arr);
});
this.form.courseList = res.message;
}).catch((res) => {
});
},
saveAdd(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
var arr = this.form.courseList.map(v => {
var obj = {
...v
};
delete obj.uploadList;
return obj;
});
let data = {
courseLink: arr
};
this.$post(this.api.addCourseLink, data).then((res) => {
this.$message.success("添加成功!");
this.goback();
}).catch((res) => {
});
}
});
},
addcourse() {
this.form.courseList = this.form.courseList.concat({
projectId: this.$store.state.systemId,
courseId: this.$store.state.courseId,
linkName: "",
fileLink: "",
uploadList: []
});
},
//
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess(response, file, fileList, idx) {
this.form.courseList[idx].uploadList.push({ name: file.name, url: response.message.fileUrl });
this.form.courseList[idx].fileLink = response.message.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
});
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList, idx) {
let uploadList = this.form.courseList[idx].uploadList;
uploadList.forEach((item, index) => {
if (file.name == item.name) {
uploadList.splice(index, 1);
}
});
},
delCourse(index) {
this.$confirm("确定要删除该课件吗?", "提示", {
type: "warning"
})
.then(() => {
this.form.courseList.splice(index, 1);
this.$message.success("删除成功");
})
.catch(() => {
});
},
goback() {
this.$router.go(-1);
}
}
};
</script>
<style scoped>
/* .courseware ul .el-input{
width: 30%;
} */
.courseware ul li {
margin-top: 20px;
padding: 0 0 10px 0;
border-bottom: 1px dashed #eee;
}
.courseware ul li:first-child {
margin-top: 0;
}
.courseware ul li:last-child {
border-bottom: none;
}
.uploadTitle {
height: 40px !important;
font-size: 16px;
}
</style>

@ -69,25 +69,26 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="curriculumType" label="课程类别" align="center">
<el-table-column prop="curriculumType" label="课程类别" width="90" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span>
</template>
</el-table-column>
<el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column>
<el-table-column label="配置的系统" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sysName }}</span>
</template>
</el-table-column>
<el-table-column prop="curriculumName" label="内容资源" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="练习项目" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="考核项目" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="状态" align="center"></el-table-column>
<el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column>
<el-table-column prop="expectedCourse" label="创建时间" align="center"></el-table-column>
<el-table-column prop="expectedCourse" label="最近编辑时间" align="center"></el-table-column>
<el-table-column prop="userName" label="编辑人" align="center"></el-table-column>
<el-table-column prop="expectedCourse" label="预计课时" width="90" align="center"></el-table-column>
<el-table-column prop="orderVolume" label="订单量" width="90" align="center"></el-table-column>
<el-table-column prop="userName" label="创建人" width="120" align="center"></el-table-column>
<el-table-column label="上架/下架" width="90" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.isShelves" :active-value="1" :inactive-value="0"
@change="changeSwitch($event, scope.row)" v-auth="'/curriculum:上下架'">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button>
@ -217,7 +218,7 @@ export default {
//
addcourse () {
this.setReferrer()
this.$router.push("/addcurriculum");
this.$router.push("/curriculum/add");
},
//
edit (row) {

File diff suppressed because it is too large Load Diff

@ -0,0 +1,973 @@
<template>
<div class="wrap">
<el-card v-if="!id" shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="back" :content="'新建课程'"></el-page-header>
</div>
</el-card>
<div class="page">
<div class="overflow">
<ul :class="['steps', { pointer: !editing && id && publishStatus }]">
<li :class="{ active: step === 1, done: step > 1 }" @click="toStep(1)">
<span class="circle">1</span>
<p class="text">填写课程信息</p>
</li>
<li :class="{ active: step === 2, done: step > 2 }" @click="toStep(2)">
<span class="circle circle2">2</span>
<p class="text">设置练习项目</p>
</li>
<li :class="{ active: step === 3, done: step > 3 }" @click="toStep(3)">
<span class="circle circle3">3</span>
<p class="text">设置考核项目</p>
</li>
<li :class="{ done: step > 3 }">
<span class="circle circle4">4</span>
<p class="text">完成</p>
</li>
</ul>
<div class="page-content">
<el-form v-show="step === 1" :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="课程名称" prop="curriculumName">
<el-input class="w-input" id="focus-el" placeholder="请输入课程名称"
v-model.trim="form.curriculumName"></el-input>
</el-form-item>
<el-form-item label="课程类别" prop="curriculumType">
<el-select class="w-input" v-model="form.curriculumType" clearable placeholder="请选择课程类型">
<el-option label="实训课程" :value="1"></el-option>
<el-option label="理论课程" :value="0"></el-option>
<el-option label="理实课程" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item class="req" label="适用专业" required>
<div class="subject">
<div v-for="(item, i) in form.mallDisciplines" :key="i" class="line">
<el-form-item label="学科类别">
<el-select v-model="item.categoryId" @change="getProfessionalClass(item)">
<el-option v-for="(item, index) in subjectList" :key="index" :label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="专业类">
<el-select v-model="item.professionalCategoryId" :disabled="item.categoryId ? false : true"
@change="getProfessional(item)">
<el-option v-for="(item, index) in item.professionalClassList" :key="index"
:label="item.professionalClassName" :value="item.professionalClassId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="专业">
<el-select v-model="item.professionalId" :disabled="item.professionalCategoryId ? false : true">
<el-option v-for="(item, index) in item.professionalList" :key="index"
:label="item.professionalName" :value="item.professionalId"></el-option>
</el-select>
</el-form-item>
<i v-if="i && !isDetail" class="del el-icon-delete" @click="form.mallDisciplines.splice(i, 1)"></i>
</div>
</div>
<div v-if="!isDetail" class="subject-plus" @click="addSubject">
<i class="el-icon-circle-plus-outline"></i>
</div>
</el-form-item>
<el-form-item label="预计课时" prop="expectedCourse">
<el-select class="w-input" v-model="form.expectedCourse" clearable placeholder="请选择预计课时">
<el-option label="32课时" value="32课时"></el-option>
<el-option label="64课时" value="64课时"></el-option>
</el-select>
</el-form-item>
<el-form-item label="供应厂商" prop="supplier">
<el-select class="w-input" v-model="form.supplier" clearable placeholder="请选择供应厂商" multiple>
<el-option v-for="(item, i) in suppliers" :key="i" :label="item.supplierName"
:value="item.supplierId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程封面">
<el-card shadow="hover">
<div class="cover-wrap">
<el-upload name="file" accept=".jpg,.png,.jpeg,.gif" ref="upload" drag :on-remove="handleRemove"
:on-error="uploadError" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action=""
:http-request="handleRequest">
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<p>将图片拖到此处<em>点击上传</em></p>
<p style="font-size: 12px;color: #9f9f9f;line-height: 1.4;">建议上传484*278像素图片</p>
</div>
</el-upload>
<div class="preview">
<p class="preview-title">默认图片预览</p>
<img class="preview-pic" :src="form.coverUrl" alt="">
</div>
</div>
</el-card>
</el-form-item>
<el-form-item label="课程简介" prop="briefIntroduction">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.briefIntroduction"
:init="editorConfig" :disabled="isDetail" />
</el-form-item>
<el-form-item label="详情介绍" prop="teachingObjectives">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.teachingObjectives"
:init="editorConfig" :disabled="isDetail" />
</el-form-item>
</el-form>
<template v-if="step === 2">
<div class="tool">
<ul class="filter">
<li>
<label>状态</label>
<el-select v-model="form.courseType" clearable placeholder="请选择状态" style="width: 150px"
@change="getData">
<el-option v-for="(item, index) in status" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<label>搜索</label>
<el-input placeholder="请输入实训项目名称、理论试卷名称" suffix-icon="el-icon-search" v-model="form.keyWord" clearable
size="small" style="width: 300px"></el-input>
</li>
</ul>
<div>
<el-button @click="handleBatchDelete(0)">批量移除</el-button>
<el-button @click="handleConfig(0)" icon="el-icon-plus" circle></el-button>
</div>
</div>
<div>
<el-table :data="practiceData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionPractice">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="remark" label="状态" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.trim="scope.row.sort"
@input="practiceSortChange(scope.row, scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column label="展示控制" align="center" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.isShow" :active-value="0" :inactive-value="1"
:disabled="scope.row.disabled">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="scope.row.disabled"
@click.native.prevent="handleDelete(scope.$index, practiceData)">移除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
</div>
</div>
</div>
<!-- 配置弹窗 -->
<el-dialog :visible.sync="configVisible" width="1200px" center custom-class="config-dia">
<div class="config-wrap">
<div class="item system">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>系统列表</span>
</div>
<el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model.trim="systemKeyword"
clearable></el-input>
<ul class="systems">
<li v-for="(item, i) in systems" :key="i" :title="item.systemName">
<el-checkbox v-model="item.check" @change="val => systemChange(val, item)"></el-checkbox>
<div :class="['name', { active: curSystem == item.systemId }]" @click="getProject(item)">
<span>{{ item.systemName }}</span>
<i class="el-icon-arrow-right"></i>
</div>
</li>
</ul>
</div>
<div class="item project">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>项目列表</span>
</div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="projectKeyword"
clearable></el-input>
<ul class="systems">
<el-checkbox v-if="projects.length" v-model="checkAll" label="全选"
@change="val => checkAllChange(val, projects[0].systemId)"></el-checkbox>
<li v-for="(item, i) in projects" :key="i" :title="item.projectName">
<el-checkbox v-model="item.check"
:label="item.remark ? item.remark + '(' + item.projectName + ')' : (item.projectName || item.paperName)"
@change="val => projectChange(val, item)"></el-checkbox>
</li>
</ul>
</div>
<div class="item checked">
<div class="title-wrap flex-center">
<p class="addhr_tag"></p>
<span>已选择项目{{ checkeds.length }}</span>
</div>
<el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search"
v-model.trim="checkedKeyword" clearable></el-input>
<el-table :data="checkeds" class="table" header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center">
<template slot-scope="scope">
{{ scope.row.type === 1 ? '流程类' : scope.row.type === 3 ? '理论' : '编程类' }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="55">
<template slot-scope="scope">
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]"
@click="delProject(scope.$index, scope.row)"></i>
</template>
</el-table-column>
</el-table>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="configVisible = false"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Util from '@/libs/util'
import Editor from '@tinymce/tinymce-vue'
import editorConfig from '@/utils/editor'
import Oss from '@/components/upload/upload.js'
export default {
components: {
Editor,
},
data () {
return {
headers: {
token: sessionStorage.getItem("token")
},
editorConfig,
isDetail: Boolean(this.$route.query.isDetail),
step: 1,
form: {
cid: this.$route.query.cid,
curriculumName: "",
curriculumType: '',
courseType: "",
categoryId: 1,
professionalCategoryId: 1,
professionalId: 1,
expectedCourse: "",
briefIntroduction: "",
teachingObjectives: "",
systemIdByAssessment: [],
systemIdByPractice: [],
supplier: [],
coverUrl: 'https://izhixinyun.com/images/course-cover.png',
mallDisciplines: [
{
professionalClassList: [],
professionalList: [],
categoryId: 1,
professionalCategoryId: 1,
professionalId: 1,
}
],
},
rules: {
curriculumName: [
{ required: true, message: "请输入课程名称", trigger: "blur" }
],
categoryId: [
{ required: true, message: "请选择学科类别", trigger: "change" }
],
professionalId: [
{ required: true, message: "请选择专业", trigger: "change" }
],
supplier: [
{ required: true, message: "请选择供应厂商", trigger: "change" }
],
expectedCourse: [
{ required: true, message: "请选择预计课时", trigger: "change" }
],
professionalCategoryId: [
{ required: true, message: "请选择专业类", trigger: "change" }
],
courseType: [
{ required: true, message: "请选择课程类别", trigger: "change" }
],
},
subjectList: [],
ProfessionalClassList: [],
ProfessionalList: [],
pageNo: 1,
pageSize: 10,
multipleSelection: [],
systemKeyword: "",
searchTimer: null,
configVisible: false,//
permissions: "", // 01
practiceData: [],
practiceTotal: 0,
multiplePractice: [],
matches: [],
matcheTotal: 0,
multipleMatch: [],
submiting: false, //
loadIns: null,
updateTime: 0,
systemAll: [],
systems: [],
systemsAll: [],
systemChecked: [],
curSystem: '',
projects: [],
projectKeyword: '',
checkedKeyword: '',
checkeds: [],
checkedAll: [],
checkAll: false,
suppliers: [],
mulSystem: this.$store.state.btns.includes('/curriculum:支持多系统组课'), //
status: [
{
id: 0,
name: '正常'
}
],
practiceData: [],
practiceTotal: 0,
multiplePractice: [],
assessmentData: [],
assessmentTotal: 0,
multipleAssessment: [],
};
},
watch: {
// ,
form: {
handler () {
this.updateTime++
},
deep: true
},
systemKeyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getConfig();
}, 500);
},
projectKeyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getProject();
}, 500);
},
checkedKeyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.filterChecked();
}, 500);
}
},
created () {
},
mounted () {
this.getSubject()
this.getConfig()
this.getSystem()
this.getSupplier()
this.form.cid && this.getInfoData()
},
methods: {
getInfoData () {
this.$post(`${this.api.curriculumDetail}?cid=${this.form.cid}`).then(({ data }) => {
if (data.supplier) data.supplier = data.supplier.split(',').map(e => +e)
if (data.categoryId) {
this.$get(this.api.courseProfessionalClass, { disciplineId: data.categoryId }).then(res => {
this.ProfessionalClassList = res.list;
}).catch(res => { });
}
if (data.professionalCategoryId) {
this.$get(this.api.courseProfessional, { professionalClassId: data.professionalCategoryId }).then(res => {
this.ProfessionalList = res.list;
}).catch(res => { });
}
this.$nextTick(() => {
this.form = data;
const pList = data.practiceConfig
const { systemsAll } = this
pList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.practiceData = pList
const aList = data.assessmentConfig
aList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.assessmentData = aList
const cList = data.competitionConfig
cList.map(e => {
if (!systemsAll.find(n => n.systemId == e.systemId)) e.disabled = true
})
this.matches = cList
});
}).catch(err => {
});
},
//
getSupplier () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$get(this.api.getSupplierListByRole, {
permissionId: sid.permissionId
}).then(res => {
this.suppliers = res.supplierList
}).catch(res => { })
},
//
getSystem () {
const checked = this[!this.permissions ?
'practiceData' :
this.permissions == 1 ?
'assessmentData' :
'matches']
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$post(this.api.queryServiceConfig, {
systemName: '',
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
}).then(({ serviceList }) => {
this.systemsAll = serviceList.records
}).catch(err => { })
},
//
addSubject () {
const e = {
professionalClassList: [],
professionalList: [],
categoryId: 1,
professionalCategoryId: 1,
professionalId: 1,
}
this.form.mallDisciplines.push(e)
this.getProfessionalClassData(e)
},
//
getSubject () {
this.$get(this.api.courseDiscipline).then(res => {
this.subjectList = res.list
this.form.mallDisciplines.forEach(e => {
e.categoryId === 1 && this.getProfessionalClass(e)
})
}).catch(err => { })
},
//
clearClass (item) {
item.professionalCategoryId = item.categoryId === 1 ? 1 : ''
item.professionalId = item.categoryId === 1 ? 1 : ''
},
//
getProfessionalClass (item) {
this.clearClass(item);
this.getProfessionalClassData(item);
},
getProfessionalClassData (item) {
this.$get(this.api.courseProfessionalClass, {
disciplineId: item.categoryId
}).then(res => {
item.professionalClassList = res.list
this.form.mallDisciplines.forEach(e => {
e.professionalCategoryId === 1 && this.getProfessional(e)
})
}).catch(err => { })
},
//
clearProfess (item) {
item.professionalId = item.professionalCategoryId === 1 ? 1 : ''
},
//
getProfessional (item) {
this.clearProfess(item);
this.getProfessionalData(item);
},
getProfessionalData (item) {
this.$get(this.api.courseProfessional, {
professionalClassId: item.professionalCategoryId
}).then(res => {
item.professionalList = res.list
}).catch(err => { })
},
handleExceed (files, fileList) {
Util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
},
//
async handleRequest ({ file }) {
Oss.upload(file).then(res => {
this.form.coverUrl = res.url
})
},
uploadError (err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove () {
Oss.del(this.form.coverUrl)
this.form.coverUrl = ''
},
//
getConfig () {
const checked = this[!this.permissions ?
'practiceData' :
this.permissions == 1 ?
'assessmentData' :
'matches']
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
this.$post(this.api.queryServiceConfig, {
systemName: this.systemKeyword,
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
}).then(res => {
const list = res.serviceList.records
this.systemAll = JSON.parse(JSON.stringify(list)) //
const result = []
list.map(e => {
//
// if (!checked.find(n => n.systemId == e.systemId)) {
// e.check = !!checked.find(n => n.systemId == e.systemId)
e.check = false
result.push(e)
// }
})
this.systems = result
this.checkAll = !!checked.find(n => n.systemId == result[0].systemId) //
result.length && this.getProject(result[0])
}).catch(err => { })
},
//
async getProject (item, fromSystemChange) {
const checked = this.checkeds
if (item) this.curSystem = item.systemId
let res
if (!fromSystemChange) {
res = await this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${this.curSystem}&keyword=${this.projectKeyword}`)
}
const result = []
const projects = fromSystemChange ? this.projects : res
projects.map(e => {
//
const include = checked.some(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && n.paperId == e.paperId))
e.check = include
result.push(e)
})
this.checkAll = !result.filter(e => !e.check).length
this.projects = result
},
//
systemChange (val, item) {
//
const { projects, checkeds } = this
if (projects.length && projects[0].systemId == item.systemId) {
projects.map(e => {
e.check = val
})
}
this.projectKeyword = ''
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}&keyword=${this.projectKeyword}`).then(res => {
if (val) {
//
if (!this.mulSystem) {
this.systems.map(e => e.check = false)
item.check = true
}
res.map(e => {
if (!checkeds.find(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))) {
checkeds.push(e)
}
})
} else {
res.map(e => {
const i = checkeds.findIndex(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))
i === -1 || checkeds.splice(i, 1)
})
}
this.checkedAll = JSON.parse(JSON.stringify(checkeds)) //
this.getProject(item, 1)
}).catch(err => { })
},
//
checkAllChange (val, systemId) {
this.systemChange(val, { systemId })
this.systems.map(e => {
if (e.systemId == systemId) e.check = val
})
},
//
projectChange (val, item) {
const { systemId, paperId } = item
const i = this.checkeds.findIndex(e => (item.projectId && e.projectId == item.projectId && e.systemId == systemId) || (paperId && paperId == e.paperId))
// push
if (val) {
this.checkeds.push(item)
} else if (i !== -1) {
this.checkeds.splice(i, 1)
}
//
this.systems.map(e => {
if (e.systemId == systemId) e.check = !this.projects.filter(n => !n.check).length
})
this.checkAll = !this.projects.find(e => !e.check) //
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) //
},
//
filterChecked () {
const val = this.checkedKeyword
this.checkeds = this.checkedAll.filter(e => (e.projectName && e.projectName.includes(val)) || (e.paperName && e.paperName.includes(val)))
},
//
delProject (i, e) {
if (e.disabled) return
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.checkeds.splice(i, 1)
// checkdisabled
if (e.systemId == this.curSystem) {
const { projectId, paperId } = e
this.projects.map(n => {
if ((projectId && n.projectId == projectId) || (paperId && n.paperId == paperId)) {
n.check = false
}
})
this.checkAll = !this.projects.find(e => !e.check)
}
this.systems.map(n => {
if (n.systemId == e.systemId) n.check = false
})
}).catch(() => { })
},
//
handleConfirm () {
const list = this.checkeds
if (!list.length) {
this.$message.warning("请选择系统!");
} else {
this.configVisible = false
list.map((e, i) => {
e.isShow = 0; // isShow(0: 1:)
e.sort = i + 1; //
});
if (!this.permissions) {
this.practiceData = JSON.parse(JSON.stringify(list))
this.practiceTotal = this.practiceData.length;
} else if (this.permissions == 1) {
this.assessmentData = JSON.parse(JSON.stringify(list))
this.assessmentTotal = this.assessmentData.length;
} else if (this.permissions == 2) {
this.matches = JSON.parse(JSON.stringify(list))
this.matchTotal = this.matches.length;
}
}
},
handleSelectionPractice (val) { //
this.multiplePractice = val;
},
handleSelectionMatch (val) { //
this.multipleMatch = val;
},
//
handleConfig (type) {
this.systemKeyword = ''
this.projectKeyword = ''
this.checkedKeyword = ''
this.permissions = type;
this.configVisible = true;
this.pageNo = 1;
this.getConfig();
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData))
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds))
},
handleBatchDelete (type) { //
if (type == 1 && !this.multipleAssessment.length) {
this.$message.warning("请勾选考核项目!");
return;
} else if (!type && !this.multiplePractice.length) {
this.$message.warning("请勾选练习项目!");
return;
} else if (type == 2 && !this.multipleMatch.length) {
this.$message.warning("请勾选竞赛项目!");
return;
}
this.$confirm("此操作将批量移除项目, 是否继续?", "提示", {
type: "warning"
}).then(() => {
if (type == 1) {
let ids = this.multipleAssessment.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.assessmentData.length; i++) {
if (!ids.includes(this.assessmentData[i].projectId)) {
tempArr.push(this.assessmentData[i]);
}
}
this.assessmentData = tempArr;
} else if (!type) {
let ids = this.multiplePractice.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.practiceData.length; i++) {
if (!ids.includes(this.practiceData[i].projectId)) {
tempArr.push(this.practiceData[i]);
}
}
this.practiceData = tempArr;
} else {
let ids = this.multipleMatch.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.matches.length; i++) {
if (!ids.includes(this.matches[i].projectId)) {
tempArr.push(this.matches[i]);
}
}
this.matches = tempArr;
}
this.$message.success("批量移除成功");
}).catch(() => {
this.$message.info("已取消批量移除");
});
},
handleDelete (index, data) { //
this.$confirm("此操作将移除该项目, 是否继续?", "提示", {
type: "warning"
}).then(() => {
data.splice(index, 1);
this.$message.success("移除成功");
}).catch(() => {
this.$message.info("已取消移除");
});
},
practiceSortChange (row, index) { //
this.practiceData.splice(index, 1, row);
},
save () {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
form.supplier = form.supplier.join()
this.submiting = true
this.loadIns = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
debugger
if (form.cid) {
this.$post(this.api.modifyCourse, form).then((res) => {
this.$message.success("编辑成功");
}).catch((res) => {
this.submiting = false
this.loadIns.close()
});
} else {
this.$post(this.api.createCurriculum, form).then((res) => {
this.loadIns.close()
this.$router.push('/curriculum')
}).catch((res) => {
this.submiting = false
this.loadIns.close()
});
}
} else {
return false;
}
});
},
}
};
</script>
<style lang="scss" scoped>
.wrap {
width: 1000px;
margin: 0 auto;
/deep/.w-input {
width: 400px;
}
.cover-wrap {
display: flex;
justify-content: space-around;
.preview-title {
margin-bottom: 10px;
font-size: 16px;
color: #000;
text-align: center;
}
.preview-pic {
width: 220px;
max-height: 140px;
}
}
.subject {
padding: 10px;
border: 1px dashed #ccc;
.line {
position: relative;
display: flex;
padding-right: 50px;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
.el-form-item {
margin-bottom: 0;
}
.del {
position: absolute;
top: 11px;
right: 20px;
cursor: pointer;
}
}
.subject-plus {
margin-top: 5px;
text-align: center;
font-size: 18px;
color: #062c87;
cursor: pointer;
}
}
/deep/.config-dia {
.config-wrap {
display: flex;
}
.title-wrap {
margin-bottom: 15px;
}
.item {
width: 250px;
max-height: 600px;
padding: 10px;
margin-right: 20px;
overflow: hidden;
}
.system {
background-color: #f9f9f9;
}
.systems {
margin-top: 10px;
max-height: 520px;
overflow: auto;
li {
display: flex;
align-items: center;
margin: 10px 0;
}
.name {
display: inline-flex;
flex: 1;
justify-content: space-between;
align-items: center;
margin-left: 5px;
cursor: pointer;
&.active,
&:hover {
color: #062c87;
}
span {
max-width: 200px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}
.checked {
flex: 1;
width: auto;
.el-table .cell {
font-size: 12px;
}
}
.rm {
font-size: 14px;
cursor: pointer;
&.disabled {
color: #ccc;
cursor: not-allowed;
}
&:hover {
color: #17161f;
}
}
}
</style>

@ -0,0 +1,200 @@
<template>
<div>
</div>
</template>
<script>
import util from "@/libs/util";
import Const from '@/const/match'
import _ from 'lodash'
export default {
props: ['editing'],
data () {
return {
id: this.$route.query.id,
pageNo: 1,
pageSize: 10,
multipleSelection: [],
systemKeyword: "",
searchTimer: null,
configVisible: false,//
};
},
watch: {
// ,
form: {
handler () {
this.updateTime++
},
deep: true
},
},
mounted () {
this.ruleForm = JSON.parse(JSON.stringify(this.form.competitionStageList[0]))
this.id && this.getData()
this.step1 || this.getStep1() //
},
methods: {
save () {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
form.supplier = form.supplier.join()
if (!this.practiceData.length) {
this.$message.warning("请添加练习项目配置");
return;
} else {
form.systemIdByPractice = this.practiceData.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId || '',
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
return obj;
});
form.systemIdByPractice.sort((a, b) => a.sort - b.sort)
}
if (!this.assessmentData.length) {
this.$message.warning("请添加考核项目配置");
return;
} else {
form.systemIdByAssessment = this.assessmentData.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
return obj;
});
form.systemIdByAssessment.sort((a, b) => a.sort - b.sort)
}
//
form.systemIdByCompetition = this.matches.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
return obj;
});
form.systemIdByCompetition.sort((a, b) => a.sort - b.sort)
this.submiting = true
this.loadIns = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
debugger
if (form.cid) {
this.$post(this.api.modifyCourse, form).then((res) => {
this.$message.success("编辑成功");
}).catch((res) => {
this.submiting = false
this.loadIns.close()
});
} else {
this.$post(this.api.createCurriculum, form).then((res) => {
this.loadIns.close()
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success",
confirmButtonText: "马上设置",
cancelButtonText: "稍后操作",
closeOnClickModal: false
}).then(() => {
this.$router.push(`/contentSettings?cid=${res.cid}&name=${form.curriculumName}`);
}).catch(() => {
this.$router.push('/curriculum')
})
}).catch((res) => {
this.submiting = false
this.loadIns.close()
});
}
} else {
return false;
}
});
},
}
};
</script>
<style scoped lang="scss">
/deep/ .d-inline-block {
width: 216px;
.el-select,
.el-input {
width: 100%;
}
}
.inline-input {
.input-wrap {
display: flex;
align-items: center;
margin-bottom: 10px;
.el-input {
display: inline-block;
width: 216px;
margin-right: 8px;
}
.remove {
width: 16px;
height: 16px;
background: url('../../../assets/img/close.png') 0 0 / cover no-repeat;
cursor: pointer;
}
}
.add-btn {
margin-left: 32px;
}
}
.input-center {
display: flex;
align-items: center;
width: 216px;
white-space: nowrap;
.el-input {
margin-right: 5px;
}
}
.step-set {
padding: 15px;
background-color: #fbfbfb;
}
.tips {
font-size: 13px;
color: #959595;
}
.req {
color: #f00;
}
.line {
margin-bottom: 10px;
}
</style>

@ -0,0 +1,202 @@
<template>
<div>
<div class="mgb20 flex-between">
<div class="flex-center ">
<p class="addhr_tag"></p>
<span>考核项目配置</span>
</div>
<div>
<el-button @click="handleBatchDelete(1)">批量移除</el-button>
<el-button @click="handleConfig(1)" icon="el-icon-plus" circle></el-button>
</div>
</div>
<div class="border-b-dashed"></div>
<!-- 实训配置 -->
<div>
<el-table :data="assessmentData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionAssessment">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.trim="scope.row.sort" @input="assessmentSortChange(scope.row, scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column label="展示控制" align="center" width="100">
<template slot-scope="scope">
<el-switch v-model="scope.row.isShow" :active-value="0" :inactive-value="1" :disabled="scope.row.disabled">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="scope.row.disabled"
@click.native.prevent="handleDelete(scope.$index, assessmentData)">移除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import Oss from '@/components/upload/upload.js'
import Setting from '@/setting'
import Util from '@/libs/util'
export default {
props: ['setupId', 'competitionId', 'editing'],
data () {
return {
};
},
watch: {
// ,
form: {
handler () {
this.updateTime++
},
deep: true
},
},
mounted () {
},
methods: {
//
handleConfig (type) {
this.systemKeyword = ''
this.projectKeyword = ''
this.checkedKeyword = ''
this.permissions = type;
this.configVisible = true;
this.pageNo = 1;
this.getConfig();
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData))
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds))
},
handleBatchDelete (type) { //
if (type == 1 && !this.multipleAssessment.length) {
this.$message.warning("请勾选考核项目!");
return;
} else if (!type && !this.multiplePractice.length) {
this.$message.warning("请勾选练习项目!");
return;
} else if (type == 2 && !this.multipleMatch.length) {
this.$message.warning("请勾选竞赛项目!");
return;
}
this.$confirm("此操作将批量移除项目, 是否继续?", "提示", {
type: "warning"
}).then(() => {
if (type == 1) {
let ids = this.multipleAssessment.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.assessmentData.length; i++) {
if (!ids.includes(this.assessmentData[i].projectId)) {
tempArr.push(this.assessmentData[i]);
}
}
this.assessmentData = tempArr;
} else if (!type) {
let ids = this.multiplePractice.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.practiceData.length; i++) {
if (!ids.includes(this.practiceData[i].projectId)) {
tempArr.push(this.practiceData[i]);
}
}
this.practiceData = tempArr;
} else {
let ids = this.multipleMatch.map(i => i.projectId);
let tempArr = [];
for (let i = 0; i < this.matches.length; i++) {
if (!ids.includes(this.matches[i].projectId)) {
tempArr.push(this.matches[i]);
}
}
this.matches = tempArr;
}
this.$message.success("批量移除成功");
}).catch(() => {
this.$message.info("已取消批量移除");
});
},
assessmentSortChange (row, index) { //
this.assessmentData.splice(index, 1, row);
},
handleSelectionAssessment (val) { //
this.multipleAssessment = val;
},
handleDelete (index, data) { //
this.$confirm("此操作将移除该项目, 是否继续?", "提示", {
type: "warning"
}).then(() => {
data.splice(index, 1);
this.$message.success("移除成功");
}).catch(() => {
this.$message.info("已取消移除");
});
},
}
};
</script>
<style scoped lang="scss">
.step {
padding-bottom: 10px;
background-color: #f9f9f9;
.title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
margin-bottom: 10px;
background-color: #ededed;
}
}
.line {
margin-bottom: 10px;
}
/deep/.req {
.el-form-item__label {
&:before {
content: '*';
margin-right: 5px;
font-size: 18px;
vertical-align: middle;
color: #f00;
}
}
}
/deep/.file-upload {
width: 500px;
.download {
position: absolute;
bottom: -63px;
right: 0;
font-size: 12px;
color: #007eff;
cursor: pointer;
}
}
/deep/.tips-dia {
.el-dialog__body {
padding: 10px 20px;
}
}
</style>

@ -0,0 +1,56 @@
<template>
<div class="wrap">
<div class="modal">
<el-steps :space="200"
:active="4"
finish-status="success">
<el-step title="大赛信息填写"></el-step>
<el-step title="赛程与规则设置"></el-step>
<el-step title="比赛内容设置"></el-step>
<el-step title="发布"></el-step>
</el-steps>
<h1>大赛已发布</h1>
<div class="btns">
<el-button type="primary"
@click="back">确定</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
};
},
mounted () {
},
methods: {
back () {
this.$router.push(this.$store.state.referrer || '/match')
}
}
};
</script>
<style scoped lang="scss">
.wrap {
height: calc(100vh - 300px);
background-color: #fefefe;
}
.modal {
width: 500px;
padding-top: 150px;
margin: 0 auto;
h1 {
margin: 20px;
text-align: center;
}
.btns {
text-align: center;
}
}
</style>

@ -826,9 +826,9 @@ export default {
}
.action-btn {
color: #9076ff;
color: #062c87;
font-size: 14px;
border: #9076ff 1px solid;
border: #062c87 1px solid;
background-color: #fff;
border-radius: 4px;
}

@ -1296,7 +1296,7 @@ export default {
.plus-cus {
margin-left: 10px;
font-size: 18px;
color: #9076ff;
color: #062c87;
cursor: pointer;
}
@ -1308,7 +1308,7 @@ export default {
cursor: pointer;
&:hover {
color: #9076ff;
color: #062c87;
}
}
}

@ -216,7 +216,7 @@
</template>
<script>
import Util from "@/libs/util";
import Util from '@/libs/util'
import quill from "@/components/quill";
import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js'

@ -112,7 +112,7 @@
<el-dialog title="提示" :visible.sync="tipsVisible" width="500px" :close-on-click-modal="false"
custom-class="tips-dia">
<p style="font-size: 17px;text-align: center;color: #9076ff;">编辑发布成功</p>
<p style="font-size: 17px;text-align: center;color: #062c87;">编辑发布成功</p>
<p style="margin: 5px 0px 10px;line-height: 1.6">
温馨提示报名结束后更改报名时间或赛程规则不影响已分配的阶段参赛人员且后续添加的人员不会自动分配如需重新自动分配所有团队请到报名列表执行全员重新分配操作
</p>

@ -792,7 +792,7 @@ export default {
.score {
font-size: 16px;
font-weight: 600;
color: #9076ff;
color: #062c87;
}
}

@ -1451,7 +1451,7 @@ $avatar-width: 104px;
margin-top: 5px;
text-align: center;
font-size: 18px;
color: #9076ff;
color: #062c87;
cursor: pointer;
}

@ -368,7 +368,7 @@ export default {
.icon {
font-size: 16px;
color: #9076ff;
color: #062c87;
cursor: pointer;
}
</style>

@ -1,91 +1,49 @@
<template>
<div class="wrap">
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="$router.back()">
<div class="per_title" v-preventReClick @click="$router.back()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school"
v-text="id ? '编辑更新日志' : '新增更新日志'"></span>
<span class="per_school" v-text="id ? '编辑更新日志' : '新增更新日志'"></span>
</div>
<div>
<el-button type="primary"
round
v-preventReClick
@click="submit(0)">发布</el-button>
<el-button v-if="draft || !id"
type="primary"
round
v-preventReClick
@click="submit(1)">草稿</el-button>
<el-button type="primary" round v-preventReClick @click="submit(0)">发布</el-button>
<el-button v-if="draft || !id" type="primary" round v-preventReClick @click="submit(1)">草稿</el-button>
</div>
</div>
</el-card>
<el-card class="page"
shadow="hover">
<el-form class="form"
ref="form"
label-width="120px"
center>
<el-form-item class="required"
label="版本标题">
<el-input placeholder="请输入版本标题"
v-model="form.versionName"
maxlength="30"
style="width: 400px"
@change="nameChange"></el-input>
<el-card class="page" shadow="hover">
<el-form class="form" ref="form" label-width="120px" center>
<el-form-item class="required" label="版本标题">
<el-input placeholder="请输入版本标题" v-model="form.versionName" maxlength="30" style="width: 400px"
@change="nameChange"></el-input>
</el-form-item>
<el-form-item label="封面图片">
<el-upload class="avatar-uploader"
accept=".jpg,.png,.jpeg"
:on-remove="handleRemove"
:on-error="uploadError"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
action=""
:http-request="handleRequest">
<img v-if="form.coverUrl"
:src="form.coverUrl"
class="avatar">
<div class="uploader-default"
v-else>
<el-upload class="avatar-uploader" accept=".jpg,.png,.jpeg" :on-remove="handleRemove" :on-error="uploadError"
:before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action="" :http-request="handleRequest">
<img v-if="form.coverUrl" :src="form.coverUrl" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
</el-upload>
</el-form-item>
<el-form-item class="required"
label="更新内容">
<el-form-item class="required" label="更新内容">
<ul class="contents">
<li v-for="(item, i) in form.logContents"
:key="i">
<li v-for="(item, i) in form.logContents" :key="i">
<div class="action">
<el-select v-model="item.type"
size="small"
placeholder="请选择">
<el-option v-for="item in funcList"
:key="item.id"
:label="item.name"
:value="item.id">
<el-select v-model="item.type" size="small" placeholder="请选择">
<el-option v-for="item in funcList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<div class="btns">
<i v-if="i === form.logContents.length - 1"
class="el-icon-circle-plus-outline"
@click="add"></i>
<i class="el-icon-delete"
@click="del(i)"></i>
<i v-if="i === form.logContents.length - 1" class="el-icon-circle-plus-outline" @click="add"></i>
<i class="el-icon-delete" @click="del(i)"></i>
</div>
</div>
<el-input type="textarea"
:rows="5"
placeholder="请输入"
v-model="item.content">
<el-input type="textarea" :rows="5" placeholder="请输入" v-model="item.content">
</el-input>
</li>
</ul>
@ -234,99 +192,107 @@ export default {
<style lang="scss" scoped>
.page {
display: flex;
justify-content: center;
min-height: calc(100vh - 310px);
/deep/.required {
label:before {
content: '*';
margin-right: 5px;
vertical-align: middle;
color: #f00;
}
display: flex;
justify-content: center;
min-height: calc(100vh - 310px);
/deep/.required {
label:before {
content: '*';
margin-right: 5px;
vertical-align: middle;
color: #f00;
}
}
}
$avatar-width: 104px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
width: $avatar-width;
height: auto;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.el-upload {
position: relative;
width: $avatar-width;
height: auto;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
&:hover {
border-color: #409eff;
}
&:hover {
border-color: #409eff;
}
.uploader-default {
display: flex;
flex-direction: column;
justify-content: center;
width: $avatar-width !important;
height: $avatar-width;
text-align: center;
background: rgba(0, 0, 0, 0.04);
.uploader-default {
display: flex;
flex-direction: column;
justify-content: center;
width: $avatar-width !important;
height: $avatar-width;
text-align: center;
background: rgba(0, 0, 0, 0.04);
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
line-height: 1;
}
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
line-height: 1;
}
}
.avatar {
width: $avatar-width;
height: $avatar-width;
display: block;
}
.avatar {
width: $avatar-width;
height: $avatar-width;
display: block;
}
}
.el-upload__tip {
margin-top: 0;
.el-upload__tip {
margin-top: 0;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
}
&:first-child {
margin-bottom: 5px;
}
}
}
}
.contents {
width: 700px;
li {
padding: 15px;
margin-bottom: 20px;
border: 1px dashed #e9e9e9;
border-radius: 8px;
}
.action {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.btns {
i {
margin-left: 10px;
color: #9076ff;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
width: 700px;
li {
padding: 15px;
margin-bottom: 20px;
border: 1px dashed #e9e9e9;
border-radius: 8px;
}
.action {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.btns {
i {
margin-left: 10px;
color: #062c87;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
}
}
</style>

@ -1,11 +1,8 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="$router.back()">
<div class="per_title" v-preventReClick @click="$router.back()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">{{ platformName }}日志管理</span>
@ -19,70 +16,45 @@
<h6>日志更新</h6>
<div class="filter">
<label>版本查询</label>
<el-select v-model="versionName"
size="small"
placeholder="请选择版本"
filterable
@change="verChange">
<el-option v-for="item in vers"
:key="item.id"
:label="item.name"
:value="item.id">
<el-select v-model="versionName" size="small" placeholder="请选择版本" filterable @change="verChange">
<el-option v-for="item in vers" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
<div>
<el-button type="primary"
@click="add"
v-auth="'/system:日志更新:管理:新增日志'">新增日志</el-button>
<el-button type="primary" @click="add" v-auth="'/system:日志更新:管理:新增日志'">新增日志</el-button>
</div>
</div>
<el-timeline class="timeline">
<el-timeline-item placement="top"
v-for="(item, i) in listData"
:key="i"
:class="['item' + i, {draft: item.draft}]">
<el-timeline-item placement="top" v-for="(item, i) in listData" :key="i"
:class="['item' + i, { draft: item.draft }]">
<p class="sign">{{ item.draft ? '未发布' : item.draftTime }}</p>
<div class="ver">
<div>
{{ item.versionName + (item.draft ? '(草稿)' : '') }}
<span class="action">
<i class="el-icon-edit-outline"
@click="edit(item)"
v-auth="'/system:日志更新:管理:编辑日志'"></i>
<i class="el-icon-delete"
@click="del(item)"
v-auth="'/system:日志更新:管理:删除日志'"></i>
<i class="el-icon-edit-outline" @click="edit(item)" v-auth="'/system:日志更新:管理:编辑日志'"></i>
<i class="el-icon-delete" @click="del(item)" v-auth="'/system:日志更新:管理:删除日志'"></i>
</span>
</div>
<div>
<template v-if="!i && item.withdrawNum !== 1 && item.draft !== 1">
<span class="withdraw"
v-if="item.withdraw && item.open">已撤回</span>
<el-button v-else
style="margin-right: 10px"
type="primary"
size="small"
@click="revoke(item)">撤销</el-button>
<span class="withdraw" v-if="item.withdraw && item.open">已撤回</span>
<el-button v-else style="margin-right: 10px" type="primary" size="small"
@click="revoke(item)">撤销</el-button>
</template>
<el-switch v-model="item.open"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, item)"
v-auth="'/system:日志更新:管理:开启日志'"></el-switch>
<el-switch v-model="item.open" :active-value="0" :inactive-value="1" @change="switchOff($event, item)"
v-auth="'/system:日志更新:管理:开启日志'"></el-switch>
</div>
</div>
<ul class="detail">
<li v-for="(item, i) in item.logContents"
:key="i">
<p v-if="!isNaN(item.type)"
class="name"><img :src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')"
alt=""> {{ funcList.find(e => e.id === item.type).name }}</p>
<li v-for="(item, i) in item.logContents" :key="i">
<p v-if="!isNaN(item.type)" class="name"><img
:src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')" alt=""> {{
funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p class=""
v-for="(item, i) in item.content"
:key="i">{{ item }}</p>
<p class="" v-for="(item, i) in item.content" :key="i">{{ item }}</p>
</div>
</li>
</ul>
@ -225,114 +197,136 @@ export default {
</script>
<style lang="scss" scoped>
.page {
min-height: calc(100vh - 300px);
padding: 24px 0;
.inner {
width: 900px;
margin: 0 auto;
}
min-height: calc(100vh - 300px);
padding: 24px 0;
.inner {
width: 900px;
margin: 0 auto;
}
}
.tool {
padding-bottom: 20px;
margin-bottom: 0;
border-bottom: 1px solid #f0f0f0;
padding-bottom: 20px;
margin-bottom: 0;
border-bottom: 1px solid #f0f0f0;
}
.filters {
display: inline-flex;
align-items: center;
h6 {
margin-right: 100px;
font-size: 18px;
}
display: inline-flex;
align-items: center;
h6 {
margin-right: 100px;
font-size: 18px;
}
}
/deep/.timeline {
padding-left: 20%;
overflow: hidden;
.el-timeline-item__node--normal {
top: 30px;
}
.el-timeline-item__wrapper {
top: 15px;
padding-left: 40px;
}
.el-timeline-item__tail {
height: 250%;
border-left-width: 1px;
}
padding-left: 20%;
overflow: hidden;
.el-timeline-item__node--normal {
top: 30px;
}
.el-timeline-item__wrapper {
top: 15px;
padding-left: 40px;
}
.el-timeline-item__tail {
height: 250%;
border-left-width: 1px;
}
.sign {
position: relative;
display: inline-block;
margin-left: -22%;
font-size: 14px;
color: #062c87;
}
.draft {
.ver,
.sign {
position: relative;
display: inline-block;
margin-left: -22%;
font-size: 14px;
color: #9076ff;
}
.draft {
.ver,
.sign {
color: #b1b1b1;
}
color: #b1b1b1;
}
.ver {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
margin: -19px 0 20px;
font-size: 18px;
color: #9076ff;
border-bottom: 1px dashed #bfbfbf;
}
.ver {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
margin: -19px 0 20px;
font-size: 18px;
color: #062c87;
border-bottom: 1px dashed #bfbfbf;
}
.withdraw {
margin-right: 10px;
font-size: 13px;
color: #979797;
}
.action {
margin-left: 15px;
i {
margin-left: 8px;
font-size: 14px;
color: #062c87;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
.withdraw {
margin-right: 10px;
font-size: 13px;
color: #979797;
}
.detail {
li {
margin-bottom: 20px;
}
.action {
margin-left: 15px;
i {
margin-left: 8px;
font-size: 14px;
color: #9076ff;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 15px;
font-weight: 600;
img {
width: 20px;
margin-right: 5px;
}
}
.detail {
li {
margin-bottom: 20px;
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 15px;
font-weight: 600;
img {
width: 20px;
margin-right: 5px;
}
}
.val {
font-size: 14px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
color: #6a6a6a;
&:before {
content: '';
display: inline-block;
width: 5px;
height: 5px;
margin: 0 10px 0 5px;
vertical-align: middle;
border-radius: 20px;
background-color: #c5b8ff;
}
}
.val {
font-size: 14px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
color: #6a6a6a;
&:before {
content: '';
display: inline-block;
width: 5px;
height: 5px;
margin: 0 10px 0 5px;
vertical-align: middle;
border-radius: 20px;
background-color: #c5b8ff;
}
}
}
}
}
</style>

@ -140,7 +140,8 @@
</span>
</el-dialog>
<div v-show="previewImg" class="el-image-viewer__wrapper" :class="{ active: previewImg }" style="z-index: 2000">
<div v-show="previewImg" class="el-image-viewer__wrapper" :class="{ active: previewImg }"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="previewImg = ''"><i
class="el-icon-circle-close" style="color: #fff"></i></span>
@ -867,7 +868,7 @@ export default {
}
.el-button--primary.action-btn {
color: #9076ff !important;
color: #062c87 !important;
font-size: 14px !important;
background-color: #fff !important;
border-radius: 4px !important;

@ -321,7 +321,7 @@ export default {
.port-name {
margin: 10px 0;
font-size: 15px;
color: #9076ff;
color: #062c87;
}
.fields {

Loading…
Cancel
Save