模型修改

Branch_d40a2540
yujialong 1 year ago
parent 44a321d6e1
commit e305d06c22
  1. 4
      src/api/index.js
  2. 7
      src/pages/expSystem/backstage/model.vue
  3. 42
      src/pages/expSystem/backstage/sourceModel.vue
  4. 33
      src/pages/expSystem/backstage/sourceType.vue
  5. 2
      src/pages/expSystem/list/index.vue
  6. 15
      src/pages/match/manage/matchRank.vue
  7. 37
      src/pages/station/preview/index.vue
  8. 5
      src/styles/page/station.scss

@ -443,6 +443,7 @@ export default {
deleteReferenceDemo: `nakadai/nakadai/model/reference/demo/deleteReferenceDemo`, deleteReferenceDemo: `nakadai/nakadai/model/reference/demo/deleteReferenceDemo`,
saveReferenceDemo: `nakadai/nakadai/model/reference/demo/saveReferenceDemo`, saveReferenceDemo: `nakadai/nakadai/model/reference/demo/saveReferenceDemo`,
referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`, referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`,
sortReadingModelByTeacherSideSystem: `nakadai/nakadai/model/reference/demo/sortReadingModelByTeacherSideSystem`,
getAllModelList: `nakadai/nakadai/model/reference/demo/getAllModelList`, getAllModelList: `nakadai/nakadai/model/reference/demo/getAllModelList`,
synchronizationMdel: `nakadai/nakadai/model/reference/demo/synchronizationMdel`, synchronizationMdel: `nakadai/nakadai/model/reference/demo/synchronizationMdel`,
builtInClassificationByNakadai: `nakadai/nakadai/model/reference/builtInClassificationByNakadai`, builtInClassificationByNakadai: `nakadai/nakadai/model/reference/builtInClassificationByNakadai`,
@ -454,6 +455,9 @@ export default {
displayListOrNotByTeacher: `nakadai/nakadai/model/demo/displayListOrNotByTeacher`, displayListOrNotByTeacher: `nakadai/nakadai/model/demo/displayListOrNotByTeacher`,
builtInModelStateByTeacher: `nakadai/nakadai/model/demo/builtInModelStateByTeacher`, builtInModelStateByTeacher: `nakadai/nakadai/model/demo/builtInModelStateByTeacher`,
modelRedis: `nakadai/nakadai/model/demo/getRedisCache`, modelRedis: `nakadai/nakadai/model/demo/getRedisCache`,
systemModelByTeacher: `nakadai/nakadai/model/reference/demo/systemModelByTeacher`,
demoHiddenOpen: `nakadai/model/demo/hidden/batchOpen`,
demoHiddenClose: `nakadai/model/demo/hidden/batchShutdown`,
// 教师评语 // 教师评语
addComment: `evaluation/cevaluation/comment/addComment`, addComment: `evaluation/cevaluation/comment/addComment`,

@ -205,13 +205,14 @@ export default {
founder: 1, founder: 1,
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
systemId: this.systemId systemId: this.systemId,
isOpen: 0
}).then(res => { }).then(res => {
const modelList = res.data.records const modelList = res.data.records
//
// //
this.$post(this.api.sourceModelClassification + '?founder=1').then(res => { this.$post(this.api.sourceModelClassification + '?founder=1').then(({ data }) => {
let { data } = res
const promises = [] const promises = []
const addType = list => { const addType = list => {
list.map((e, i) => { list.map((e, i) => {

@ -80,19 +80,20 @@
(scope.row.postStatus ? '已发布' : '草稿') }} (scope.row.postStatus ? '已发布' : '草稿') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isSystem" <el-table-column label="操作"
label="操作"
width="230"> width="230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'/expSystem/list:进入:源模型管理:查看'" <el-button v-auth="'/expSystem/list:进入:源模型管理:查看'"
type="text" type="text"
@click="show(scope.row)">查看</el-button> @click="show(scope.row)">查看</el-button>
<template v-if="!isSystem">
<el-button v-auth="'/expSystem/list:进入:源模型管理:编辑'" <el-button v-auth="'/expSystem/list:进入:源模型管理:编辑'"
type="text" type="text"
@click="edit(scope.row)">编辑</el-button> @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/expSystem/list:进入:源模型管理:删除'" <el-button v-auth="'/expSystem/list:进入:源模型管理:删除'"
type="text" type="text"
@click="del(scope.row)">删除</el-button> @click="del(scope.row)">删除</el-button>
<el-switch v-auth="'/expSystem/list:进入:源模型管理:禁用'" <el-switch v-auth="'/expSystem/list:进入:源模型管理:禁用'"
v-if="scope.row.postStatus" v-if="scope.row.postStatus"
v-model="scope.row.isOpen" v-model="scope.row.isOpen"
@ -102,6 +103,15 @@
:active-text="scope.row.isOpen ? '禁用' : '启用'" :active-text="scope.row.isOpen ? '禁用' : '启用'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch> @change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template> </template>
<el-switch v-else-if="!scope.row.isOpen"
v-auth="'/expSystem/list:进入:源模型管理:禁用'"
v-model="scope.row.isClose"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
:active-text="scope.row.isOpen ? '禁用' : '启用'"
@change="switchOffSystem($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
@ -165,16 +175,16 @@ export default {
// //
if (this.isSystem) { if (this.isSystem) {
// //
res = await this.$post(this.api[!curNode.level ? 'getAllModelList' : 'referenceDemoList'], data) res = await this.$post(this.api[!curNode.level ? 'systemModelByTeacher' : 'sortReadingModelByTeacherSideSystem'], data)
} else { } else {
data.founder = 1 data.founder = 1
// //
res = await this.$post(this.api.InstitutionSourceModel, data) res = await this.$post(this.api.InstitutionSourceModel, data)
}
// ztOpen=1) // ztOpen=1)
res.data.records.forEach(e => { res.data.records.forEach(e => {
if (e.ztOpen) e.isOpen = 1 if (e.ztOpen) e.isOpen = 1
}) })
}
this.listData = res.data.records this.listData = res.data.records
this.total = res.data.total this.total = res.data.total
}, },
@ -216,6 +226,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(this.api.deleteSysModelDemo, ids).then(res => { this.$post(this.api.deleteSysModelDemo, ids).then(res => {
this.$refs.table.clearSelection()
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => { }) }).catch(res => { })
@ -246,19 +257,20 @@ export default {
batchOff (ztOpen) { batchOff (ztOpen) {
const off = ztOpen === 0 const off = ztOpen === 0
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
// const { isSystem } = this
let list = [] const list = this.multipleSelection.map(e => {
this.multipleSelection.map(e => { return isSystem ? e.id : {
list.push({
isOpen: ztOpen, isOpen: ztOpen,
modelId: e.id, modelId: e.id,
type: 1 type: 1
}) }
}) })
this.$confirm(`确定要${off ? '启用' : '禁用'}吗?`, "提示", { this.$confirm(`确定要${off ? '启用' : '禁用'}吗?`, "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(this.api.disableModelDemo, list).then(res => { //
this.$post(this.api[isSystem ? (off ? 'demoHiddenOpen' : 'demoHiddenClose') : 'disableModelDemo'], list).then(res => {
this.$refs.table.clearSelection()
this.$message.success(`${off ? '启用' : '禁用'}成功`) this.$message.success(`${off ? '启用' : '禁用'}成功`)
this.getData() this.getData()
}).catch(res => { }) }).catch(res => { })
@ -267,8 +279,8 @@ export default {
this.$message.error("请先选择模型 !") this.$message.error("请先选择模型 !")
} }
}, },
// //
switchOff (val, row, index) { switchOff (val, row,) {
this.$post(this.api.disableModelDemo, [{ this.$post(this.api.disableModelDemo, [{
isOpen: val, isOpen: val,
modelId: row.id, modelId: row.id,
@ -277,6 +289,12 @@ export default {
this.$message.success(val ? '禁用成功' : '启用成功') this.$message.success(val ? '禁用成功' : '启用成功')
}).catch(res => { }) }).catch(res => { })
}, },
//
switchOffSystem (val, row) {
this.$post(this.api[val ? 'demoHiddenClose' : 'demoHiddenOpen'], [row.id]).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功')
}).catch(res => { })
},
handleSelectionChange (val) { handleSelectionChange (val) {
this.multipleSelection = val this.multipleSelection = val
}, },

@ -3,6 +3,7 @@
<div> <div>
<el-tree :data="orgList" <el-tree :data="orgList"
ref="tree" ref="tree"
default-expand-all
node-key="id" node-key="id"
highlight-current highlight-current
:expand-on-click-node="false" :expand-on-click-node="false"
@ -34,6 +35,7 @@
</el-tree> </el-tree>
<el-tree :data="orgListSystem" <el-tree :data="orgListSystem"
default-expand-all
ref="systemTree" ref="systemTree"
node-key="id" node-key="id"
highlight-current highlight-current
@ -97,25 +99,27 @@ export default {
}, },
methods: { methods: {
async getType () { async getType () {
const { categoryId, isSystem } = this.$route.query
// //
const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1') const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1')
this.orgList = data this.orgList = data
data.length && this.$nextTick(() => {
const { categoryId } = this.$route.query //
this.$refs.tree.setCurrentKey(categoryId || data[0].id) const res = await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`)
this.orgListSystem = res.data
this.$nextTick(() => {
this.$refs[isSystem == 1 ? 'systemTree' : 'tree'].setCurrentKey(categoryId || data[0].id)
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey() categoryId: this.$refs[isSystem == 1 ? 'systemTree' : 'tree'].getCurrentKey(),
isSystem
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('getData') this.$emit('initData', +isSystem)
}) })
//
const res = await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`)
this.orgListSystem = res.data
}, },
// //
nodeClick () { nodeClick () {
@ -124,7 +128,8 @@ export default {
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey() categoryId: this.$refs.tree.getCurrentKey(),
isSystem: 0
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('initData') this.$emit('initData')
@ -132,6 +137,14 @@ export default {
// //
nodeSystemClick () { nodeSystemClick () {
this.$refs.tree.setCurrentKey(null) this.$refs.tree.setCurrentKey(null)
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.systemTree.getCurrentKey(),
isSystem: 1
}
}).catch(err => { })
this.$emit('initData', 1) this.$emit('initData', 1)
}, },
// //

@ -57,7 +57,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="toBackstage(scope.row)" @click="toBackstage(scope.row)"
v-if="scope.row.systemId !== '11'" v-if="scope.row.systemId !== '11' && scope.row.systemId !== '12'"
v-auth>进入</el-button> v-auth>进入</el-button>
</template> </template>
</el-table-column> </el-table-column>

@ -311,7 +311,8 @@ export default {
let second = data.getSeconds(); let second = data.getSeconds();
return [`${hour}:${minute}:${second} - 23:59:59`] return [`${hour}:${minute}:${second} - 23:59:59`]
})(), })(),
} },
uploaded: 0
}; };
}, },
mounted () { mounted () {
@ -575,6 +576,10 @@ export default {
this.published = true this.published = true
this.timeId = res.releaseTime.id this.timeId = res.releaseTime.id
this.publishTime = res.releaseTime.releaseTime this.publishTime = res.releaseTime.releaseTime
} else {
this.published = false
this.timeId = ''
this.publishTime = ''
} }
}, },
// //
@ -588,6 +593,7 @@ export default {
}) })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData() this.getData()
this.uploaded = 0
this.publishVisible = false this.publishVisible = false
}, },
// //
@ -601,8 +607,13 @@ export default {
// //
// //
if (publish) { if (publish) {
//
if (this.type && !this.uploaded) {
return util.errorMsg('请先上传数据!')
} else {
this.publishTime = new Date() this.publishTime = new Date()
this.publishVisible = true this.publishVisible = true
}
} else { } else {
try { try {
// //
@ -646,6 +657,7 @@ export default {
}, },
uploadSuccess (res, file, fileList) { uploadSuccess (res, file, fileList) {
this.uploadFaild = false this.uploadFaild = false
this.uploaded = 0
if (res.status === 200) { if (res.status === 200) {
const { exportCode } = res.data const { exportCode } = res.data
if (exportCode) { if (exportCode) {
@ -653,6 +665,7 @@ export default {
this.uploadFaild = true this.uploadFaild = true
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`)
} else { } else {
this.uploaded = 1
this.importVisible = false this.importVisible = false
this.getRank() this.getRank()
util.successMsg('请检查数据后,点击发布排名以发布数据!') util.successMsg('请检查数据后,点击发布排名以发布数据!')

@ -254,18 +254,18 @@
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(item)"></i> @click="delComment(item)"></i>
<template v-if="item.isLike"> <!-- <div class="like-wrap"
<img class="icon"
src="@/assets/img/like-up.png"
alt=""
@click="like(item)"> @click="like(item)">
{{ item.likeCount }} <img v-if="item.isLike"
</template> class="icon"
src="@/assets/img/like-up.png"
alt="">
<img v-else <img v-else
class="icon" class="icon"
src="@/assets/img/like.png" src="@/assets/img/like.png"
alt="" alt="">
@click="like(item)"> {{ item.likeCount || '' }}
</div> -->
</div> </div>
</div> </div>
<div class="reply" <div class="reply"
@ -292,7 +292,7 @@
<div class="texts"> <div class="texts">
<div class="name">{{reply.createUsername}}</div> <div class="name">{{reply.createUsername}}</div>
<div class="flex m-v-8"> <div class="flex m-v-8">
<template v-if="reply.showReplyName"> <template>
回复 回复
<span class="reply-name">@{{ reply.replyUsername }}</span> <span class="reply-name">@{{ reply.replyUsername }}</span>
</template> </template>
@ -306,18 +306,18 @@
<i v-if="deleteIdentity || reply.currentAccountId == reply.createAccountId" <i v-if="deleteIdentity || reply.currentAccountId == reply.createAccountId"
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(reply)"></i> @click="delComment(reply)"></i>
<template v-if="reply.isLike"> <!-- <div class="like-wrap"
<img class="icon" @click="like(item, reply)">
<img v-if="reply.isLike"
class="icon"
src="@/assets/img/like-up.png" src="@/assets/img/like-up.png"
alt="" alt="">
@click="like(reply)">
{{ reply.likeCount }}
</template>
<img v-else <img v-else
class="icon" class="icon"
src="@/assets/img/like.png" src="@/assets/img/like.png"
alt="" alt="">
@click="like(reply)"> {{ reply.likeCount || '' }}
</div> -->
</div> </div>
</div> </div>
<div class="reply" <div class="reply"
@ -725,8 +725,9 @@ export default {
this.$post(this.api.addCommentStation, { this.$post(this.api.addCommentStation, {
cid: this.courseId, cid: this.courseId,
content, content,
// pid: reply ? reply.commentId : row ? row.commentId : 0,
pid: row ? row.commentId : 0, pid: row ? row.commentId : 0,
replyAccountId: row.createAccountId || '', replyAccountId: reply ? reply.createAccountId : row.createAccountId || '',
status: row ? 2 : 1 status: row ? 2 : 1
}).then(res => { }).then(res => {
this.comment = '' this.comment = ''

@ -51,6 +51,11 @@
} }
} }
} }
.like-wrap {
display: inline-flex;
align-items: center;
cursor: pointer;
}
} }
.reply { .reply {
margin-top: 20px; margin-top: 20px;

Loading…
Cancel
Save