模型修改

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`,
saveReferenceDemo: `nakadai/nakadai/model/reference/demo/saveReferenceDemo`,
referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`,
sortReadingModelByTeacherSideSystem: `nakadai/nakadai/model/reference/demo/sortReadingModelByTeacherSideSystem`,
getAllModelList: `nakadai/nakadai/model/reference/demo/getAllModelList`,
synchronizationMdel: `nakadai/nakadai/model/reference/demo/synchronizationMdel`,
builtInClassificationByNakadai: `nakadai/nakadai/model/reference/builtInClassificationByNakadai`,
@ -454,6 +455,9 @@ export default {
displayListOrNotByTeacher: `nakadai/nakadai/model/demo/displayListOrNotByTeacher`,
builtInModelStateByTeacher: `nakadai/nakadai/model/demo/builtInModelStateByTeacher`,
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`,

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

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

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

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

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

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

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

Loading…
Cancel
Save