|
|
|
@ -216,36 +216,41 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 配置弹窗 --> |
|
|
|
|
<el-dialog :visible.sync="configVisible" width="1200px" center custom-class="config-dia"> |
|
|
|
|
<el-drawer title="添加系统资源" :visible.sync="configVisible" size="1200px" :close-on-click-modal="false" |
|
|
|
|
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> |
|
|
|
|
<h6 class="p-title" style="margin-bottom: 0;">课程系统列表</h6> |
|
|
|
|
|
|
|
|
|
<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 class="line"> |
|
|
|
|
<el-checkbox v-model="item.check" @change="val => courseChange(val, item)"></el-checkbox> |
|
|
|
|
<div :class="['name', { active: curSystem == item.id }]" @click="getProject(item)"> |
|
|
|
|
<span>{{ item.label }}</span> |
|
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="children"> |
|
|
|
|
<div v-for="(system, j) in item.children" :key="j" :title="system.label" class="line"> |
|
|
|
|
<el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> |
|
|
|
|
<div :class="['name', { active: curSystem == item.id }]" @click="getProject(system)"> |
|
|
|
|
<span>{{ system.label }}</span> |
|
|
|
|
<i class="el-icon-arrow-right"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="item project"> |
|
|
|
|
<div class="title-wrap flex-center"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>项目列表</span> |
|
|
|
|
</div> |
|
|
|
|
<h6 class="p-title">项目列表</h6> |
|
|
|
|
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="projectKeyword" |
|
|
|
|
clearable></el-input> |
|
|
|
|
|
|
|
|
|
<ul class="systems"> |
|
|
|
|
<ul class="projects"> |
|
|
|
|
<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"> |
|
|
|
@ -257,33 +262,33 @@ |
|
|
|
|
</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 v-if="checkeds.length"> |
|
|
|
|
<div class="flex-between m-b-10"> |
|
|
|
|
<p class="total">已选项目(共{{ checkeds.length }}个)</p> |
|
|
|
|
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="checkedKeyword" clearable></el-input> |
|
|
|
|
|
|
|
|
|
<div class="lines"> |
|
|
|
|
<template v-for="(item, i) in checkeds"> |
|
|
|
|
<div v-if="item.projectName.includes(checkedKeyword)" :key="i" class="line"> |
|
|
|
|
<div class="check-left"> |
|
|
|
|
<el-checkbox v-model="item.check"></el-checkbox> |
|
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
|
<el-tooltip effect="dark" :content="item.projectName" placement="top-start"> |
|
|
|
|
<p class="checked-name ellipsis">{{ item.projectName }}</p> |
|
|
|
|
</el-tooltip> |
|
|
|
|
</div> |
|
|
|
|
<i class="el-icon-delete action-icon" @click="delProject(item)"></i> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<div v-else class="none"> |
|
|
|
|
<img class="icon" src="@/assets/img/empty.svg" alt=""> |
|
|
|
|
<p>暂无数据</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -291,7 +296,7 @@ |
|
|
|
|
<el-button @click="configVisible = false">取 消</el-button> |
|
|
|
|
<el-button type="primary" @click="handleConfirm">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</el-drawer> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -301,6 +306,7 @@ import Util from '@/libs/util' |
|
|
|
|
import Editor from '@tinymce/tinymce-vue' |
|
|
|
|
import editorConfig from '@/components/editor' |
|
|
|
|
import Oss from '@/components/upload/upload.js' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
Editor, |
|
|
|
@ -308,11 +314,8 @@ export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
cid: this.$route.query.cid, |
|
|
|
|
headers: { |
|
|
|
|
token: sessionStorage.getItem("token") |
|
|
|
|
}, |
|
|
|
|
editorConfig, |
|
|
|
|
step: 1, |
|
|
|
|
step: 2, |
|
|
|
|
form: { |
|
|
|
|
curriculumName: "", |
|
|
|
|
curriculumType: '', |
|
|
|
@ -325,7 +328,6 @@ export default { |
|
|
|
|
teachingObjectives: "", |
|
|
|
|
systemIdByAssessment: [], |
|
|
|
|
systemIdByPractice: [], |
|
|
|
|
supplier: [], |
|
|
|
|
coverUrl: 'https://izhixinyun.com/images/course-cover.png', |
|
|
|
|
curriculumDisciplines: [ |
|
|
|
|
{ |
|
|
|
@ -350,9 +352,6 @@ export default { |
|
|
|
|
professionalId: [ |
|
|
|
|
{ required: true, message: "请选择专业", trigger: "change" } |
|
|
|
|
], |
|
|
|
|
supplier: [ |
|
|
|
|
{ required: true, message: "请选择供应厂商", trigger: "change" } |
|
|
|
|
], |
|
|
|
|
expectedCourse: [ |
|
|
|
|
{ required: true, message: "请选择预计课时", trigger: "change" } |
|
|
|
|
], |
|
|
|
@ -364,17 +363,14 @@ export default { |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
subjectList: [], |
|
|
|
|
ProfessionalClassList: [], |
|
|
|
|
ProfessionalList: [], |
|
|
|
|
|
|
|
|
|
pageNo: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
multipleSelection: [], |
|
|
|
|
systemKeyword: "", |
|
|
|
|
searchTimer: null, |
|
|
|
|
configVisible: false,// 配置弹框 |
|
|
|
|
|
|
|
|
|
permissions: "", // 练习:0;考核:1 |
|
|
|
|
permissions: '', // 练习:0;考核:1 |
|
|
|
|
practiceData: [], |
|
|
|
|
practiceTotal: 0, |
|
|
|
|
multiplePractice: [], |
|
|
|
@ -387,7 +383,6 @@ export default { |
|
|
|
|
updateTime: 0, |
|
|
|
|
systemAll: [], |
|
|
|
|
systems: [], |
|
|
|
|
systemsAll: [], |
|
|
|
|
systemChecked: [], |
|
|
|
|
curSystem: '', |
|
|
|
|
projects: [], |
|
|
|
@ -397,17 +392,6 @@ export default { |
|
|
|
|
checkedAll: [], |
|
|
|
|
checkAll: false, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
status: [ |
|
|
|
|
{ |
|
|
|
|
id: 0, |
|
|
|
|
name: '正常' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
practiceData: [], |
|
|
|
|
practiceTotal: 0, |
|
|
|
|
multiplePractice: [], |
|
|
|
|
|
|
|
|
|
assessmentData: [], |
|
|
|
|
assessmentTotal: 0, |
|
|
|
|
multipleAssessment: [], |
|
|
|
@ -421,54 +405,28 @@ export default { |
|
|
|
|
}, |
|
|
|
|
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); |
|
|
|
|
this.getProject() |
|
|
|
|
}, 500) |
|
|
|
|
}, |
|
|
|
|
checkedKeyword: function (val) { |
|
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
|
this.filterChecked(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created () { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
this.getSubject() |
|
|
|
|
this.getConfig() |
|
|
|
|
this.getSystem() |
|
|
|
|
this.getCourseSystem() |
|
|
|
|
this.cid && this.getInfoData() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getInfoData () { |
|
|
|
|
this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { |
|
|
|
|
if (data.supplier) data.supplier = data.supplier.split(',').map(e => +e) |
|
|
|
|
this.form = data |
|
|
|
|
this.practiceData = data.practiceConfig |
|
|
|
|
this.assessmentData = data.assessmentConfig |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.form.curriculumDisciplines.forEach(e => { |
|
|
|
|
this.$set(e, 'professionalClassList', []) |
|
|
|
|
this.$set(e, 'professionalList', []) |
|
|
|
@ -478,26 +436,31 @@ export default { |
|
|
|
|
if (!e.professionalCategoryId) this.$set(e, 'professionalCategoryId', '') |
|
|
|
|
if (!e.professionalId) this.$set(e, 'professionalId', '') |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 获取系统 |
|
|
|
|
getSystem () { |
|
|
|
|
const checked = this[!this.permissions ? |
|
|
|
|
'practiceData' : |
|
|
|
|
this.permissions == 1 ? |
|
|
|
|
'assessmentData' : |
|
|
|
|
'matches'] |
|
|
|
|
this.$post(this.api.queryServiceConfig, { |
|
|
|
|
systemName: '', |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
supplierId: '' |
|
|
|
|
}).then(({ serviceList }) => { |
|
|
|
|
this.systemsAll = serviceList.records |
|
|
|
|
}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
|
// 获取课程系统 |
|
|
|
|
async getCourseSystem () { |
|
|
|
|
const res = await this.$get(this.api.getSystemIdBySchool) |
|
|
|
|
const systems = res.data |
|
|
|
|
|
|
|
|
|
const { data } = await this.$get(this.api.getSchoolEffectiveCourse) |
|
|
|
|
if (systems.length && data.length) { |
|
|
|
|
this.cid = [data[0].mallId] |
|
|
|
|
data.map(e => { |
|
|
|
|
e.id = e.mallId |
|
|
|
|
e.label = e.curriculumName |
|
|
|
|
e.check = false |
|
|
|
|
const children = _.cloneDeep(systems.filter(n => e.systemId.split(',').includes(n.id + ''))) // 筛选出该课程下的系统 |
|
|
|
|
children.map(n => { |
|
|
|
|
n.check = false |
|
|
|
|
}) |
|
|
|
|
e.children = children |
|
|
|
|
}) |
|
|
|
|
this.systems = data |
|
|
|
|
// this.getProject(result[0]) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 添加学科 |
|
|
|
|
addSubject () { |
|
|
|
@ -582,56 +545,12 @@ export default { |
|
|
|
|
this.form.coverUrl = '' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取系统 |
|
|
|
|
getConfig () { |
|
|
|
|
const checked = this[!this.permissions ? |
|
|
|
|
'practiceData' : |
|
|
|
|
this.permissions == 1 ? |
|
|
|
|
'assessmentData' : |
|
|
|
|
'matches'] |
|
|
|
|
this.$post(this.api.queryServiceConfig, { |
|
|
|
|
systemName: this.systemKeyword, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
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 |
|
|
|
|
// 课程选择回调 |
|
|
|
|
courseChange (val, item) { |
|
|
|
|
item.children.map(e => e.check = val) |
|
|
|
|
}, |
|
|
|
|
// 系统选择回调 |
|
|
|
|
systemChange (val, item) { |
|
|
|
|
async systemChange (val, system, course) { |
|
|
|
|
// 项目列表选中状态同步 |
|
|
|
|
const { projects, checkeds } = this |
|
|
|
|
if (projects.length && projects[0].systemId == item.systemId) { |
|
|
|
@ -640,27 +559,55 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.projectKeyword = '' |
|
|
|
|
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}&keyword=${this.projectKeyword}`).then(res => { |
|
|
|
|
const { data } = await this.$post(this.api.queryProjectManage, { |
|
|
|
|
projectName: this.projectKeyword, |
|
|
|
|
platformId: 1, |
|
|
|
|
founder: 2, |
|
|
|
|
permissions: this.permissions, |
|
|
|
|
cid: course.cid, |
|
|
|
|
mallId: course.mallId, |
|
|
|
|
systemId: system.id, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
}) |
|
|
|
|
const list = data.records |
|
|
|
|
list.forEach(e => { |
|
|
|
|
e.check = val |
|
|
|
|
const i = checkeds.findIndex(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId)) |
|
|
|
|
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) |
|
|
|
|
}) |
|
|
|
|
i === -1 && checkeds.push(e) |
|
|
|
|
} else if (i !== -1) { |
|
|
|
|
checkeds.splice(i, 1) |
|
|
|
|
} |
|
|
|
|
this.checkedAll = JSON.parse(JSON.stringify(checkeds)) // 全部已选项目,另外保存 |
|
|
|
|
this.getProject(item, 1) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}) |
|
|
|
|
this.checkedAll = _.cloneDeep(checkeds) // 全部已选项目,另外保存 |
|
|
|
|
}, |
|
|
|
|
// 获取项目列表 |
|
|
|
|
async getProject (item, fromSystemChange) { |
|
|
|
|
const checked = this.checkeds |
|
|
|
|
if (item) this.curSystem = item.systemId |
|
|
|
|
|
|
|
|
|
const { data } = await this.$post(this.api.queryProjectManage, { |
|
|
|
|
projectName: this.projectKeyword, |
|
|
|
|
platformId: 1, |
|
|
|
|
founder: 2, |
|
|
|
|
permissions: this.permissions, |
|
|
|
|
cid: item.cid, |
|
|
|
|
mallId: item.mallId, |
|
|
|
|
systemId: item.children.map(e => e.id).join(), |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
}) |
|
|
|
|
// 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 |
|
|
|
|
}, |
|
|
|
|
// 项目全选回调 |
|
|
|
|
checkAllChange (val, systemId) { |
|
|
|
@ -675,7 +622,7 @@ export default { |
|
|
|
|
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) |
|
|
|
|
i === -1 && this.checkeds.push(item) |
|
|
|
|
} else if (i !== -1) { |
|
|
|
|
this.checkeds.splice(i, 1) |
|
|
|
|
} |
|
|
|
@ -686,11 +633,6 @@ export default { |
|
|
|
|
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 |
|
|
|
@ -730,9 +672,6 @@ export default { |
|
|
|
|
} 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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -745,13 +684,11 @@ export default { |
|
|
|
|
|
|
|
|
|
// 练习考核弹框 |
|
|
|
|
handleConfig (type) { |
|
|
|
|
this.systemKeyword = '' |
|
|
|
|
this.projectKeyword = '' |
|
|
|
|
this.checkedKeyword = '' |
|
|
|
|
this.permissions = type; |
|
|
|
|
this.configVisible = true; |
|
|
|
|
this.pageNo = 1; |
|
|
|
|
this.getConfig(); |
|
|
|
|
this.pageNo = 1 |
|
|
|
|
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData)) |
|
|
|
|
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) |
|
|
|
|
}, |
|
|
|
@ -828,7 +765,6 @@ export default { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.submiting) return false |
|
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
|
form.supplier = form.supplier.join() |
|
|
|
|
form.platformId = Setting.platformId |
|
|
|
|
this.submiting = true |
|
|
|
|
this.loadIns = this.$loading({ |
|
|
|
@ -1082,27 +1018,65 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.config-dia { |
|
|
|
|
.config-wrap { |
|
|
|
|
.el-drawer__header { |
|
|
|
|
padding-bottom: 20px; |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.none { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
height: 100%; |
|
|
|
|
font-size: 14px; |
|
|
|
|
text-align: center; |
|
|
|
|
color: #a3a3a3; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.title-wrap { |
|
|
|
|
.p-title { |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.config-wrap { |
|
|
|
|
display: flex; |
|
|
|
|
padding: 15px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
|
width: 250px; |
|
|
|
|
max-height: 600px; |
|
|
|
|
width: 350px; |
|
|
|
|
height: calc(100vh - 93px); |
|
|
|
|
padding: 10px; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
&.project { |
|
|
|
|
border-right: 1px solid #eee; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.system { |
|
|
|
|
width: 350px; |
|
|
|
|
background-color: #f9f9f9; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.systems { |
|
|
|
|
max-height: calc(100vh - 133px); |
|
|
|
|
margin-top: 10px; |
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
&>.name { |
|
|
|
|
span { |
|
|
|
|
max-width: 280px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.projects { |
|
|
|
|
margin-top: 10px; |
|
|
|
|
max-height: 520px; |
|
|
|
|
overflow: auto; |
|
|
|
@ -1112,25 +1086,35 @@ export default { |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.name { |
|
|
|
|
display: inline-flex; |
|
|
|
|
flex: 1; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-left: 5px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
span { |
|
|
|
|
max-width: 200px; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
overflow: hidden; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&.active, |
|
|
|
|
&:hover { |
|
|
|
|
color: #062c87; |
|
|
|
|
} |
|
|
|
|
.children { |
|
|
|
|
padding-left: 20px; |
|
|
|
|
|
|
|
|
|
.name { |
|
|
|
|
span { |
|
|
|
|
max-width: 200px; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
overflow: hidden; |
|
|
|
|
max-width: 265px !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1138,24 +1122,42 @@ export default { |
|
|
|
|
.checked { |
|
|
|
|
flex: 1; |
|
|
|
|
width: auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-table .cell { |
|
|
|
|
font-size: 12px; |
|
|
|
|
} |
|
|
|
|
.lines { |
|
|
|
|
height: calc(100vh - 228px); |
|
|
|
|
padding-right: 10px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
overflow: auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.rm { |
|
|
|
|
font-size: 14px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
.line { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
padding: 5px 0; |
|
|
|
|
color: #333; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&.disabled { |
|
|
|
|
color: #ccc; |
|
|
|
|
cursor: not-allowed; |
|
|
|
|
} |
|
|
|
|
.serial { |
|
|
|
|
width: 32px; |
|
|
|
|
margin: 0 12px; |
|
|
|
|
text-align: center; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
color: #17161f; |
|
|
|
|
} |
|
|
|
|
.check-left { |
|
|
|
|
display: inline-flex; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.checked-name { |
|
|
|
|
width: 360px; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.action-icon { |
|
|
|
|
font-size: 14px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |