模型管理

Branch_d40a2540
yujialong 2 years ago
parent 747726392c
commit a56305d8a1
  1. 19
      package-lock.json
  2. 1
      package.json
  3. 11
      src/api/index.js
  4. BIN
      src/assets/img/error.png
  5. BIN
      src/assets/img/yes.png
  6. 386
      src/components/codemirror/index.vue
  7. 33
      src/layouts/navbar/index.vue
  8. 304
      src/pages/achievement/teach/index.vue
  9. 222
      src/pages/expSystem/backstage/addModel.vue
  10. 56
      src/pages/expSystem/backstage/compiler.vue
  11. 73
      src/pages/expSystem/backstage/index.vue
  12. 308
      src/pages/expSystem/backstage/model.vue
  13. 321
      src/pages/expSystem/backstage/modelType.vue
  14. 260
      src/pages/expSystem/backstage/sourceModel.vue
  15. 180
      src/pages/expSystem/backstage/sourceType.vue
  16. 169
      src/pages/expSystem/list/index.vue
  17. 14
      src/pages/match/manage/matchArch.vue
  18. 209
      src/pages/match/manage/matchRank.vue
  19. 4
      src/pages/product/list/index.vue
  20. 74
      src/pages/product/show/index.vue
  21. 6
      src/pages/station/preview/index.vue
  22. 35
      src/router/modules/expSystem.js
  23. 4
      src/setting.js

19
package-lock.json generated

@ -2793,6 +2793,11 @@
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"codemirror": {
"version": "5.65.13",
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.13.tgz",
"integrity": "sha512-SVWEzKXmbHmTQQWaz03Shrh4nybG0wXx2MEu3FO4ezbPW8IbnZEd5iGHGEffSUaitKYa3i+pHpBsSvw8sPHtzg=="
},
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@ -3852,6 +3857,11 @@
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
"dev": true
},
"diff-match-patch": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz",
"integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw=="
},
"diffie-hellman": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
@ -12618,6 +12628,15 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-codemirror": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/vue-codemirror/-/vue-codemirror-4.0.6.tgz",
"integrity": "sha512-ilU7Uf0mqBNSSV3KT7FNEeRIxH4s1fmpG4TfHlzvXn0QiQAbkXS9lLfwuZpaBVEnpP5CSE62iGJjoliTuA8poQ==",
"requires": {
"codemirror": "^5.41.0",
"diff-match-patch": "^1.0.0"
}
},
"vue-cropperjs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/vue-cropperjs/-/vue-cropperjs-3.0.0.tgz",

@ -20,6 +20,7 @@
"px2rem-loader": "^0.1.9",
"sortablejs": "^1.14.0",
"vue": "^2.6.10",
"vue-codemirror": "^4.0.6",
"vue-cropperjs": "^3.0.0",
"vue-i18n": "^8.10.0",
"vue-pdf": "^4.2.0",

@ -388,6 +388,17 @@ export default {
// 营销推广
listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`,
// 实验系统管理
getAllService: `nakadai/nakadai/serviceConfiguration/getAllService`,
schoolModelClassification: `nakadai/nakadai/model/reference/schoolModelClassification`,
saveAcademyModelDemo: `nakadai/nakadai/model/reference/demo/saveAcademyModelDemo`,
referenceFindById: `nakadai/nakadai/model/reference/demo/findById`,
modelFindById: `nakadai/nakadai/model/demo/findById`,
queryTheModelOfOurSchool: `nakadai/nakadai/model/reference/demo/queryTheModelOfOurSchool`,
sourceModelClassification: `nakadai/nakadai/model/category/sourceModelClassification`,
getAllModelListBySys: `nakadai/nakadai/model/demo/getAllModelListBySys`,
runPythonCode: `nakadai/nakadai/model/demo/runPythonCode`,
// 教师评语
addComment: `evaluation/cevaluation/comment/addComment`,
queryComment: `evaluation/evaluation/ccomment/queryComment`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

@ -0,0 +1,386 @@
<template>
<div class="wrap">
<div class="left">
<codemirror
v-model="codeVal"
:options="cmOption"
class="code-mirror"
@ready="ready"
ref="codemirror"
></codemirror>
<el-button
class="run btn"
type="primary"
@click="runCode"
>运行</el-button>
</div>
<div class="code-right answer">
<p class="text-wrapper">{{ runResult }}</p>
<div class="pic-wrap" v-if="picSrcList.length">
<div class="pic-item" v-for="(img, i) in picSrcList" :key="i">
<el-image
class="pic"
:src="img"
:preview-src-list="picSrcList">
</el-image>
<el-button class="download-btn btn" type="primary" size="mini" @click="downloadPic(i)">下载图片</el-button>
<a :ref="'picLink' + i" style="display: none;" download="运行结果.png" :href="img">下载图片</a>
</div>
</div>
<div class="result-right t-color" v-show="isError">
<img src="@/assets/img/yes.png" alt />运行成功
</div>
<div class="result-wrong" v-show="isError === 0">
<img src="@/assets/img/error.png" alt />
{{errLine}}行出现错误
</div>
</div>
</div>
</template>
<script>
import { codemirror } from "vue-codemirror";
import "codemirror/theme/ambiance.css"; //
import "codemirror/mode/javascript/javascript.js";
import "codemirror/mode/python/python.js";
import "codemirror/lib/codemirror.css";
// require active-line.js
import "codemirror/addon/selection/active-line.js";
// styleSelectedText
import "codemirror/addon/selection/mark-selection.js";
// hint
import "codemirror/addon/hint/show-hint.js";
import "codemirror/addon/hint/sql-hint.js";
import "codemirror/addon/hint/show-hint.css";
import "codemirror/addon/hint/javascript-hint.js";
// highlightSelectionMatches
import "codemirror/addon/scroll/annotatescrollbar.js";
import "codemirror/addon/search/matchesonscrollbar.js";
import "codemirror/addon/search/match-highlighter.js";
// keyMap
import "codemirror/mode/clike/clike.js";
import "codemirror/mode/sql/sql.js";
import "codemirror/addon/edit/matchbrackets.js";
import "codemirror/addon/comment/comment.js";
import "codemirror/addon/dialog/dialog.js";
import "codemirror/addon/dialog/dialog.css";
import "codemirror/addon/search/searchcursor.js";
import "codemirror/addon/search/search.js";
import "codemirror/keymap/sublime.js";
// foldGutter
import "codemirror/addon/fold/foldgutter.css";
import "codemirror/addon/fold/brace-fold.js";
import "codemirror/addon/fold/comment-fold.js";
import "codemirror/addon/fold/foldcode.js";
import "codemirror/addon/fold/foldgutter.js";
import "codemirror/addon/fold/indent-fold.js";
import "codemirror/addon/fold/markdown-fold.js";
import "codemirror/addon/fold/xml-fold.js";
//
import "codemirror/theme/monokai.css";
import "codemirror/theme/base16-light.css";
import { Loading } from 'element-ui';
export default {
props: ['code', 'codeId', 'projectId', 'retResult', 'readOnly'],
data() {
return {
codeVal: this.code,
runResult: '', //
isError: false, //
errLine: '', //
picSrcList: [],
loadIns: null, // loading
cmOption: {
readOnly: this.readOnly,
scrollbarStyle: "native",
tabSize: 2, // tab
styleActiveLine: true, //
lineNumbers: true, //
styleSelectedText: true,
line: true,
foldGutter: true, //
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: true }, //
mode: 'python',
lineWrapping: true, //
autoCloseTags: true,//
autoCloseBrackets: true,//
// hint.js options
hintOptions: {
//
completeSingle: false
},
// sublimeemacsvim
keyMap: "sublime",
matchBrackets: true,
showCursorWhenSelecting: true,
theme: "monokai" //
}
};
},
components: {
codemirror
},
watch: {
codeVal(val) {
this.$emit("update:code", val)
}
},
mounted() {
},
methods: {
//
ready() {
const code = this.$refs.codemirror.codemirror
code.setSize("auto", "calc(100vh - 370px)");
code.on('keypress', function() {
//
code.showHint()
});
},
//
runCode() {
let code = this.codeVal
if (!code) {
this.$message({
message: "警告哦,内容为空不可运行",
type: "warning"
})
} else {
this.loadIns = Loading.service({
background: 'transparent'
})
code = code.replace(/\.savefig\(([\u4e00-\u9fa5\w]*?['"])/mg, str => {
return str + Date.now()
})
// Python
this.$post(this.api.runPythonCode, {
code
}).then(res => {
const data = res.code
const photo = data.photoUrl
const result = data.runResult
this.$emit('cache') //
this.loadIns.close()
this.picSrcList = []
if (photo) this.picSrcList = photo.split(',')
let imgList = ''
let firtImg = ''
try {
imgList = eval(result)
} catch (error) {}
if (imgList && imgList.length) firtImg = imgList[0]
//
if (photo) {
this.isError = '' //
const text = result.replace(photo, '') //
this.runResult = text
this.picSrcList = photo.split(',')
} else if (imgList instanceof Array && imgList.length && typeof firtImg === 'string' && (firtImg.includes('.jpg') || firtImg.includes('.png') || firtImg.includes('img'))) {
/**
* 这段是为要下载图片的项目案例写的后端会返回图片名称的数组前端负责循环这个数组然后下载下来
* 只有该系统有这段代码因为其他7个系统没有下载图片的项目后续如果加了直接把这段代码复制过去即可
*/
imgList.map((n,i) => {
// util.downloadFile(`${i+1}.jpg`,n)
})
this.isError = 0
this.runResult = '下载完成'
} else {
this.isError = data.retResult
this.runResult = result
this.errLine = parseInt(result.substring(result.indexOf("line") + 4, result.length))
}
}).catch(res => {
this.isError = false
this.runResult = ''
this.picSrcList = []
this.loadIns.close()
res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。')
})
}
},
//
downloadPic(i) {
this.$refs['picLink' + i][0].click()
}
}
};
</script>
<style lang="scss" scoped>
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
background: rgba(173,173,173,.7);
}
.wrap {
display: flex;
}
.left{
position: relative;
width: calc(100% - 400px);
}
.text-wrapper {
white-space: pre-wrap;
}
/deep/.answer {
.el-tab-pane {
padding: 0 10px;
height: 340px;
overflow: hidden;
overflow-y: auto;
white-space: pre-wrap;
}
.el-dialog--center {
width: 500px;
height: 500px;
}
.el-dialog__title {
font-size: 22px;
font-weight: 500;
}
.el-tabs__nav-wrap::after {
background-color: #333;
}
.el-tabs__active-bar {
height: 0;
background-color: #fff;
}
.el-tabs__header {
background-color: #333;
}
.el-dialog--center .el-dialog__body {
padding: 0;
}
.el-tabs__item {
width: 80px;
color: #fff;
}
.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
padding-left: 20px;
}
.el-tabs__item.is-active {
color: #fff !important;
background-color: #333 !important;
}
.tips-btn {
margin-top: 10px;
height: 40px;
width: 90px;
border: none;
position: absolute;
right: 0;
background: rgba(255, 49, 49, 1);
color: rgba(255, 255, 255, 1);
&:hover,
&:focus,
&:active {
background: rgba(255, 49, 49, 1);
color: rgba(255, 255, 255, 1);
}
}
}
/deep/.CodeMirror-wrap pre.CodeMirror-line,
.CodeMirror-wrap pre.CodeMirror-line-like {
height: 30px;
line-height: 30px;
}
.result-right {
background-color: rgba(43, 40, 22, 1);
}
.result-wrong {
background-color: rgba(43, 22, 22, 1);
color: #f00;
}
.result-wrong,
.result-right {
position: absolute;
left: 20px;
right: 20px;
display: flex;
align-items: center;
bottom: 10px;
padding: 5px 10px;
img {
width: 40px;
height: 40px;
margin-top: 5px;
margin-right: 10px;
}
}
.code-right {
width: 500px;
color: #fff;
background: #1b1b1b;
display: inline-block;
position: relative;
overflow-x: auto;
p {
font-size: 18px;
margin: 10px;
position: absolute;
width: calc(100% - 14px);
top: 0;
bottom: -8px;
overflow: auto;
}
}
.pic-wrap {
position: absolute;
left: 0;
right: 0;
bottom: 5px;
display: flex;
max-width: calc(100% - 50px);
margin: 0 auto;
text-align: center;
overflow: auto;
.pic-item {
margin: 0 5px 5px;
&:only-child {
.pic {
width: 80%;
}
}
}
.pic {
display: block;
width: 100px;
margin: 0 auto 10px;
}
}
.code-mask{
z-index: 2;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.run{
z-index:99;
position:absolute;
right: 50px;
bottom:15px;
width:100px;
color:#fff;
}
.download-btn{
color:#fff;
}
/deep/.answer-wrap{
pre{
width: 100%;
white-space: pre-wrap;
}
img{
max-width: 100%;
}
}
</style>

@ -1,24 +1,40 @@
<template>
<div>
<el-menu v-if="menuRefresh" class="sidebar-el-menu" :default-active="active" background-color="#324157" text-color="#bfcbd9" active-text-color="#9278FF" unique-opened mode="horizontal" @select="menuSelect">
<el-menu v-if="menuRefresh"
class="sidebar-el-menu"
:default-active="active"
background-color="#324157"
text-color="#bfcbd9"
active-text-color="#9278FF"
unique-opened
mode="horizontal"
@select="menuSelect">
<template v-for="item in menus">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<el-submenu :index="item.index"
:key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<el-submenu v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item v-for="(threeItem,i) in subItem.subs" :key="i" :index="threeItem.index">{{ threeItem.title }}</el-menu-item>
<el-menu-item v-for="(threeItem,i) in subItem.subs"
:key="i"
:index="threeItem.index">{{ threeItem.title }}</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
<el-menu-item v-else
:index="subItem.index"
:key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<el-menu-item :index="item.index"
:key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
@ -87,6 +103,11 @@ export default {
index: "/activity/list",
title: "创业活动"
},
{
icon: "el-icon-c-scale-to-original",
index: "/expSystem/list",
title: "实验系统管理"
},
{
icon: "el-icon-postcard",
index: "/project/list",

@ -1,15 +1,22 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<el-card shadow="hover"
class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="$router.back()" :content="experimentalName"></el-page-header>
<el-page-header @back="$router.back()"
:content="experimentalName"></el-page-header>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item) in classList" :label="item.className" :name="item.id" :key="item.id"></el-tab-pane>
<el-card shadow="hover"
class="m-b-20">
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="(item) in classList"
:label="item.className"
:name="item.id"
:key="item.id"></el-tab-pane>
</el-tabs>
<div class="stat">
<div class="nums">
@ -30,11 +37,13 @@
<p class="val">{{ minScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
<div class="chart"
id="chart"></div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<h6 style="font-size: 16px">错误率分析</h6>
<div class="wrong">
<div class="line">
@ -46,60 +55,204 @@
<span>参加考试{{ min.peopleNum }}&emsp;&emsp;{{ min.errorTotal }}人做错错误率{{ min.errorRate }}%</span>
</div>
</div>
<div class="chart" id="chart1"></div>
<div class="chart"
id="chart1"></div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between m-b-20">
<div>
<!-- <el-input
size="small"
placeholder="请输入学校/学生姓名"
prefix-icon="el-icon-search"
v-model="keyword" clearable
style="width: 300px"
></el-input> -->
<el-tabs v-model="curTab"
@tab-click="tabChange">
<el-tab-pane v-for="(item) in tabs"
:label="item.name"
:name="item.id"
:key="item.id"></el-tab-pane>
</el-tabs>
</div>
<div>
<el-button type="primary" @click="delAllData">批量删除</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
<div v-if="curTab == 0">
<el-button type="primary"
@click="delAllData">批量删除</el-button>
<el-button type="primary"
@click="exportData">导出成绩列表</el-button>
<el-button type="primary"
@click="exportReport">导出成绩报告</el-button>
</div>
<div v-else>
<el-button type="primary"
@click="exportDataActivation">导出</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="reportId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template v-if="curTab == 0">
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="reportId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName" label="学校" min-width="150" align="center">
<el-table-column prop="schoolName"
label="学校"
min-width="150"
align="center">
</el-table-column>
<el-table-column v-if="permissions" prop="experimentalName" label="考核名称" min-width="250" align="center">
<el-table-column v-if="permissions"
prop="experimentalName"
label="考核名称"
min-width="250"
align="center">
<template slot-scope="scope">
{{ experimentalName }}
</template>
</el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center"></el-table-column>
<el-table-column prop="timeSum" label="耗时" width="90" align="center">
<el-table-column prop="userName"
label="学生姓名"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="学号"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="score"
label="分数"
width="90"
align="center"></el-table-column>
<el-table-column prop="timeSum"
label="耗时"
width="90"
align="center">
<template slot-scope="scope">
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<el-table-column prop="submitTime"
label="提交时间"
min-width="150"
align="center">
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<el-table-column label="操作"
align="center"
width="160">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-button type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
</template>
<template v-else>
<el-table :data="activations"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionActivationChange"
row-key="reportId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageActivation - 1) * pageSizeActivation + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName"
label="学校"
min-width="150"
align="center">
</el-table-column>
<el-table-column prop="userName"
label="学生姓名"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="学号"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="score"
label="练习次数"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="score"
label="实验平均分"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="score"
label="实验最高分"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="score"
label="实验最低分"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="timeSum"
label="耗时最多"
min-width="90"
align="center">
<template slot-scope="scope">
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="timeSum"
label="耗时最少"
min-width="90"
align="center">
<template slot-scope="scope">
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="submitTime"
label="提交时间"
min-width="150"
align="center">
</el-table-column>
<el-table-column label="操作"
align="center"
width="160">
<template slot-scope="scope">
<el-button type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totalActivation"
@current-change="handleCurrentActivationChange"
:current-page="pageActivation">
</el-pagination>
</div>
</template>
</el-card>
</div>
</template>
@ -134,6 +287,22 @@ export default {
max: {},
min: {},
token: util.local.get(Setting.tokenKey),
curTab: '0',
tabs: [
{
id: '0',
name: '成绩报告'
},
{
id: '1',
name: '活跃度'
},
],
activations: [],
multipleSelectionActivation: [],
pageActivation: 1,
pageSizeActivation: 10,
totalActivation: 0,
};
},
watch: {
@ -168,6 +337,10 @@ export default {
this.activeName = this.classList[0].id;
}
}).catch(err => { })
},
// tab
tabChange () {
},
//
async getData () {
@ -222,6 +395,26 @@ export default {
util.downloadFileDirect(`学生${this.permissions ? '考核' : '练习'}成绩.xls`, new Blob([res.data]))
}).catch(res => { })
},
//
exportReport () {
this.listData.forEach(async e => {
const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${e.reportId}`)
const list = userScores
list.map((e, i) => {
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
})
for (const i in report) {
if (report[i] && typeof report[i] === 'string') report[i] = report[i].replace(/<[^>]+>/g, '')
}
report.purpose = report.purpose.replace(/<[^>]+>/g, '')
this.$post(this.api.exportBankExperimentReport, {
...report,
experimentalData: list
}).then(res => {
util.downloadFileDirect(`${e.userName}的实验报告.docx`, new Blob([res]))
}).catch(res => { })
})
},
handleDelete (row) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
@ -262,6 +455,35 @@ export default {
this.page = val;
this.handlePage();
},
handleSelectionActivationChange (val) { //
this.multipleSelectionActivation = val;
},
handleCurrentActivationChange (val) { //
this.pageActivation = val;
this.handlePage();
},
// ()
exportDataActivation () {
//
let url = this.permissions
? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}`
: `${this.api.exportPracticeInfo}?projectId=${this.id}`
// id
if (this.multipleSelection.length) {
const ids = this.multipleSelection.map(e => e.reportId)
url += `&ids=${ids.toString()}`
}
axios.get(url, {
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生${this.permissions ? '考核' : '练习'}成绩.xls`, new Blob([res.data]))
}).catch(res => { })
},
getChart () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
const list = this.listDataAll
@ -325,8 +547,8 @@ export default {
grid: {
left: '5%',
right: '5%',
top: '25%',
bottom: '15%'
top: '10%',
bottom: '30%'
},
dataZoom: [//
{
@ -351,7 +573,16 @@ export default {
textStyle: {
color: '#333',
},
// rotate: 60
formatter: function (value, index) {
value = value.substring(0, 10) + (value.length > 10 ? '...' : '')
// if (index % 2 != 0) {
// return '\n\n' + value;
// } else {
// return value;
// }
return value
}
// rotate: 45
},
data: data.map(e => e.judgmentName)
}],
@ -411,7 +642,6 @@ export default {
</script>
<style lang="scss" scoped>
/deep/ .head-card {
.el-card__body {
padding-bottom: 0px;

@ -0,0 +1,222 @@
<template>
<div class="wrap">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="isDetail ? '查看源模型' : (id ? '编辑源模型' : '新增源模型')"></el-page-header>
<div v-if="!isDetail">
<el-button type="primary"
round
v-preventReClick
@click="submit(1)">发布</el-button>
<el-button v-if="!postStatus"
type="primary"
round
v-preventReClick
@click="submit(0)">草稿</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover">
<el-form label-width="80px"
:disabled="isDetail">
<div class="item name">
<label>模型名称</label>
<el-input placeholder="请输入模型名称"
v-model="form.modelName"
maxlength="25"
style="width: 400px"></el-input>
</div>
<div class="item name">
<label>模型分类</label>
<el-cascader :options="categoryList"
v-model="categoryIdCus"
:props="categoryProps"
clearable>
</el-cascader>
</div>
<div class="item code">
<label>模型代码</label>
<codemirror :key="codeKey"
:code.sync="form.modelDemo"
:readOnly="isDetail"></codemirror>
</div>
</el-form>
</el-card>
</div>
</template>
<script>
import codemirror from '@/components/codemirror'
export default {
components: { codemirror },
data () {
return {
systemId: +this.$route.query.systemId,
categoryId: +this.$route.query.categoryId,
id: +this.$route.query.id,
postStatus: +this.$route.query.postStatus,
isDetail: Boolean(this.$route.query.show), //
isModel: Boolean(this.$route.query.model), //
categoryIdCus: [],
form: {
modelName: '',
modelDemo: ''
},
categoryList: [],
categoryProps: {
checkStrictly: true,
label: 'categoryName',
value: 'id'
},
codeKey: 1,
submiting: false,
updateTime: 0
};
},
watch: {
// ,
form: {
handler () {
this.updateTime++
},
deep: true
},
},
mounted () {
this.getType()
},
methods: {
//
async getData () {
// /
const res = await this.$post(`${this.api[this.isModel ? 'referenceFindById' : 'modelFindById']}?id=${this.id}`)
const { data } = res
const { modelName, categoryId, modelDemo } = data
this.form = {
modelName,
modelDemo
}
this.handleId(this.categoryList, categoryId)
this.codeKey++
},
// id
handleId (list, id, parentId = []) {
list.map(e => {
// idid
if (id === e.id) {
parentId.shift() // id
this.categoryIdCus = [...parentId, e.id]
} else {
e.children && this.handleId(e.children, id, [...parentId, e.id])
}
})
},
//
getType () {
this.$post(this.api.sourceModelClassification).then(res => {
const { data } = res
// children
const handleLeaf = list => {
list.map(e => {
if (e.children.length) {
handleLeaf(e.children)
} else {
delete e.children
}
})
}
handleLeaf(data)
this.categoryList = data[0].children
if (this.id) {
this.getData()
} else {
this.handleId(data, this.categoryId)
}
}).catch(res => { })
},
//
submit (postStatus, fromBack) {
if (this.submiting) return false
const { modelName, categoryId, modelDemo } = this.form
const categoryIdCus = this.categoryIdCus
const id = this.id
if (!modelName) return this.$message.error('请输入模型名称')
if (categoryIdCus[0] === 1) return this.$message.error('请选择模型分类')
if (postStatus) {
if (!modelDemo) return this.$message.error('请输入模型代码')
}
this.submiting = true
const data = {
categoryId: categoryIdCus[categoryIdCus.length - 1],
modelName,
modelDemo,
postStatus,
systemId: this.systemId
}
if (id) {
data.id = id
this.$post(this.api.updateSysModelDemo, data).then(res => {
this.$message.success('编辑成功')
fromBack || this.$router.back()
}).catch(res => {
this.submiting = false
})
} else {
this.$post(this.api.saveAcademyModelDemo, data).then(res => {
this.$message.success('新增成功')
fromBack || this.$router.back()
}).catch(res => {
this.submiting = false
})
}
},
//
backPage () {
this.$router.back()
},
//
back () {
const id = this.id
const updateTime = this.updateTime
//
if ((id && updateTime > 1) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.submit(this.postStatus ? 1 : 0, 1)
this.backPage()
}).catch(() => {
this.backPage()
})
} else {
this.backPage()
}
}
}
};
</script>
<style lang="scss" scoped>
.item {
display: flex;
margin-bottom: 20px;
label {
padding: 0 15px 0 20px;
}
&.name {
align-items: center;
label {
text-align: right;
}
}
&.code {
flex-direction: column;
label {
margin-bottom: 15px;
}
}
}
</style>

@ -0,0 +1,56 @@
<template>
<div class="wrap">
<div class="line">
<span class="field">功能</span>
<span class="field">操作</span>
</div>
<div class="line">
<span class="field">粘贴代码</span>
<div class="field">
<el-switch v-model="isOpen"
:active-text="isOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
systemId: this.$route.query.systemId,
isOpen: 0
};
},
mounted () { },
methods: {
switchOff (row) {
// this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
// util.successMsg("");
// this.getData();
// }).catch(err => {
// console.log(err);
// });
},
}
};
</script>
<style lang="scss" scoped>
.wrap {
padding: 30px;
}
.line {
display: flex;
align-items: center;
margin-bottom: 20px;
text-align: center;
.field {
width: 100px;
}
}
</style>

@ -0,0 +1,73 @@
<template>
<div>
<el-card shadow="hover"
class="m-b-20">
<el-page-header :content="'系统后台 / '+ $route.query.name"
@back="back"></el-page-header>
</el-card>
<div class="page"
style="padding: 0">
<div class="tabs">
<a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div>
<model v-if="active == 'model'"></model>
<sourceModel v-else-if="active == 'sourceModel'"></sourceModel>
<compiler v-else-if="active == 'compiler'"></compiler>
</div>
</div>
</template>
<script>
import model from "./model";
import sourceModel from "./sourceModel";
import compiler from "./compiler";
export default {
data () {
return {
active: this.$route.query.type || 'model',
tabs: {
model: "模型列表管理",
sourceModel: "源模型管理",
compiler: '编译器管理'
}
};
},
computed: {
},
components: {
model,
sourceModel,
compiler
},
created () { },
methods: {
tabChange (index) {
this.active = index
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
page: 1,
type: index,
categoryId: ''
}
})
},
back () {
this.$router.push('list')
}
}
};
</script>
<style lang="scss" scoped>
.page {
min-height: calc(100vh - 250px);
}
</style>

@ -0,0 +1,308 @@
<template>
<div class="wrap">
<div class="side">
<org ref="tree" @initData="initData" @getData="getData"></org>
</div>
<div class="right">
<h6 class="p-title">筛选</h6>
<div class="tool">
<ul class="filter">
<li>
<el-input placeholder="请输入模型名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary" round @click="add">导入模型</el-button>
<el-button type="primary" round @click="batchDel">批量移除</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
<el-table-column v-if="isTopLevel" prop="categoryName" label="分类" width="150" align="center"></el-table-column>
<el-table-column prop="createTime" label="导入时间" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
{{ scope.row.isOpen ? '禁用' : '启用' }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="del(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"></el-pagination>
</div>
</div>
<el-dialog title="请选择需要导入的模型" :visible.sync="modelVisible" width="500px" class="dialog" :close-on-click-modal="false">
<div class="model-wrap">
<el-tree
v-if="modelData.length"
:data="modelData" v-loading="modelLoading"
ref="model"
default-expand-all
show-checkbox
node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree>
<div class="none" v-else>暂无可导入的模型</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="modelVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import org from "./modelType"
export default {
data() {
return {
systemId: this.$route.query.systemId,
isTopLevel: true, //
listData: [],
keyword: '',
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
multipleSelection: [],
modelVisible: false,
modelLoading: false,
modelData: [],
submiting: false
};
},
components: {
org
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted() {},
methods: {
getData() {
const curNode = this.$refs.tree.$refs.tree.getCurrentNode() //
this.isTopLevel = !curNode.level && curNode.categoryName === '全部'
//
if (this.isTopLevel) {
this.$post(this.api.getAllModelList, {
modelName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
}).then(res => {
this.listData = res.data.records
this.total = res.data.total
}).catch(res => {})
} else {
this.$post(this.api.referenceDemoList, {
modelName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
categoryId: curNode.id
}).then(res => {
this.listData = res.data.records
this.total = res.data.total
}).catch(res => {})
}
},
initData() {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
add() {
if (!this.$refs.tree.orgList.length) return this.$message.error('请先添加模型分类')
if (this.isTopLevel) return this.$message.error('请选择子分类进入导入模型')
this.modelVisible = true
this.modelLoading = true
//
this.$post(this.api.getAllModelList, {
pageNum: 1,
pageSize: 10000,
systemId: this.systemId
}).then(res => {
const modelList = res.data.records
//
this.$post(this.api.sourceModelClassification).then(res => {
let { data } = res
const promises = []
const addType = list => {
list.map((e, i) => {
// promise
promises.push(new Promise((resolve,reject) => {
//
this.$post(this.api.sysModelDemoList, {
pageNum: 1,
pageSize: 10000,
categoryId: e.id
}).then(res => {
const { records } = res.data
const modelChildren = []
// copyIdid
records.map(n => {
if (!modelList.find(e => e.copyId === n.id)) {
n.categoryName = n.modelName
modelChildren.push(n)
}
})
// disabled
if (modelChildren.length) {
e.children = [...e.children, ...modelChildren]
} else if (records.length) {
e.disabled = true
}
resolve()
}).catch(res => {
reject()
})
}))
e.children && e.children.length && addType(e.children)
})
}
addType(data)
// disabledtrue
const handleType = list => {
return list.filter((e, i) => {
return !e.disabled
}).map(e => {
if (e.children) {
e.children = handleType(e.children)
}
return e
})
}
Promise.all(promises).then(_ => {
data = handleType(data)
this.modelData = (data.length && data[0].children && data[0].children.length) ? data : []
this.modelLoading = false
}).catch(res => {})
}).catch(res => {})
}).catch(res => {})
},
//
//
show(row) {
this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1&model=1`)
},
//
del(row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.deleteReferenceDemo, [row.id]).then(res => {
this.$message.success("删除成功")
this.getData()
}).catch(res => {})
}).catch(() => {})
},
handleSelectionChange(val) {
this.multipleSelection = val
},
//
batchDel() {
if (this.multipleSelection.length) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
let ids = this.multipleSelection.map(e => e.id)
this.$post(this.api.deleteReferenceDemo, ids).then(res => {
this.$refs.table.clearSelection()
this.$message.success("删除成功")
this.getData()
}).catch(res => {})
}).catch(() => {})
} else {
this.$message.error("请先选择模型 !")
}
},
handleCurrentChange(val) {
this.page = val
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
page: val
}
})
this.getData()
},
//
submit() {
if (this.submiting) return false
const data = []
const systemId = this.systemId
if (this.$refs.model) {
const list = this.$refs.model.getCheckedNodes() //
const categoryId = this.$refs.tree.$refs.tree.getCurrentKey() //
if (!list.length) return this.$message.error('请选择模型')
this.submiting = true
list.map(e => {
// categoryId
e.categoryId && data.push({
systemId,
categoryId,
copyId: e.id
})
})
this.$post(this.api.saveReferenceDemo, data).then(res => {
this.modelVisible = false
this.initData()
setTimeout(() => {
this.submiting = false
}, 2000)
}).catch(res => {
this.submiting = false
})
} else {
this.submiting = false
this.modelVisible = false
}
}
}
};
</script>
<style lang="scss" scoped>
.wrap {
display: flex;
min-height: calc(100vh - 310px);
padding: 0 24px;
.side {
width: 300px;
padding: 24px 10px 24px 0;
margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.right {
width: calc(100% - 374px);
padding: 24px;
}
}
.el-input__inner{
height: 32px;
}
.model-wrap {
max-height: 400px;
overflow: auto;
.none {
text-align: center;
color: #8b8b8b;
}
}
</style>

@ -0,0 +1,321 @@
<template>
<div>
<div>
<div class="front-switch">
<el-switch v-model="modelIsShow"
:active-value="0"
:inactive-value="1"
active-text="内置模型按钮前台展示"
@change="changeModelStatus"></el-switch>
</div>
<div class="flex-between m-b-20">
<el-button type="text"
icon="el-icon-refresh"
@click="syncModel">同步原始模型列表</el-button>
<el-button type="text"
@click="addType(0)">添加</el-button>
</div>
<org-tree v-if="orgList.length"
:data="orgList"
default-expand-all
ref="tree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="getSingle"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span>
<el-button type="text"
icon="el-icon-edit-outline"
@click="editType(data)">
</el-button>
<el-button type="text"
icon="el-icon-circle-plus-outline"
@click="addType(node, data)">
</el-button>
<el-button type="text"
icon="el-icon-delete"
@click="delType(data)">
</el-button>
</span>
</span>
</org-tree>
<div class="none"
v-else>暂无数据请点击添加按钮添加模型分类</div>
</div>
<el-dialog :title="Form.id ? '编辑分类' : '新增分类'"
:visible.sync="typeVisible"
width="24%"
center
@close="closeDia"
:close-on-click-modal="false">
<el-form ref="Form"
:model="Form"
:rules="rules">
<el-form-item prop="categoryName">
<el-input placeholder="请输入分类名称"
v-model="Form.categoryName"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button @click="typeVisible = false"> </el-button>
<el-button type="primary"
@click="submit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import OrgTree from "@/components/org-tree/src/tree";
export default {
props: ["Data"],
data () {
return {
systemId: this.$route.query.systemId,
modelIsShow: false,
orgList: [],
typeVisible: false,
Form: {
id: '',
parentId: '',
categoryName: '',
level: ''
},
rules: {
categoryName: [
{ required: true, message: "请输入分类名称", trigger: "blur" }
]
}
};
},
components: {
OrgTree
},
mounted () {
this.getType()
this.getModelStatus()
},
methods: {
//
getType () {
this.$post(`${this.api.modelClassList}?systemId=${this.systemId}`).then(res => {
const { data } = res
this.orgList = data
data.length && this.$nextTick(() => {
const categoryId = this.$route.query.categoryId
this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => { })
this.$emit('getData')
})
}).catch(res => { })
},
//
getModelStatus () {
this.$post(`${this.api.checkIsShowBySystemId}?systemId=${this.systemId}`).then(res => {
this.modelIsShow = res.isShow // 0 1
}).catch(res => { })
},
//
changeModelStatus (val) {
this.$post(`${this.api.modifyIsShowState}?systemId=${this.systemId}&isShow=${val}`).then(res => { }).catch(res => { })
},
getSingle () {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => { })
this.$emit('initData')
},
syncModelData () {
//
this.$post(`${this.api.delModelInfoBySystemId}?systemId=${this.systemId}`).then(res => {
this.$post(`${this.api.synchronizationMdel}?systemId=${this.systemId}`).then(res => {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: ''
}
})
this.getType()
})
}).catch(() => { })
},
syncModel () {
if (this.orgList.length) {
this.$confirm('同步后当前的组织架构将会被删除,是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.syncModelData()
}).catch(() => { })
} else {
this.syncModelData()
}
},
//
async addData (id) {
//
this.$post(this.api.sourceModelClassification).then(res => {
const { data } = res
const systemId = this.systemId
const promises = []
//
const addType = async (list, refId) => {
for (const e of list) {
// promise
// promises.push(new Promise(async (resolve, reject) => {
//
await this.$post(this.api.saveReferenceCategory, {
id: '',
categoryName: e.categoryName,
systemId,
level: e.level,
parentId: refId || id,
founder: 1
}).then(async res => {
const referenceCategoryId = res.referenceCategoryId // idparentId
//
promises.push(new Promise((resolve1, reject1) => {
this.$post(this.api.sysModelDemoList, {
pageNum: 1,
pageSize: 10000,
categoryId: e.id
}).then(res => {
let { records } = res.data
records = records.filter(e => e.postStatus && !e.isOpen) //
if (records.length) {
const modelData = []
//
records.map(e => {
modelData.push({
systemId,
categoryId: referenceCategoryId,
copyId: e.id
})
})
//
this.$post(this.api.saveReferenceDemo, modelData).then(res => {
// resolve()
resolve1()
}).catch(res => {
// reject()
reject1()
})
} else {
// resolve()
}
e.children = [...e.children, ...records]
}).catch(res => {
// reject()
})
}))
//
this.$nextTick(() => {
e.children && e.children.length && addType(e.children, res.referenceCategoryId)
})
}).catch(res => {
// reject()
})
// }))
}
}
addType(data[0].children, id)
Promise.all(promises).then(_ => {
setTimeout(this.getType, 500)
})
}).catch(res => { })
},
//
addType (node, data) {
this.typeVisible = true
this.Form.parentId = data ? data.id : 0
this.Form.level = node ? node.level : 0
},
//
editType (data) {
this.Form.id = data.id
this.Form.parentId = data ? data.parentId : 0
this.Form.categoryName = data.categoryName
this.typeVisible = true
},
//
submit () {
this.$refs['Form'].validate((valid) => {
if (valid) {
const form = this.Form
const data = {
id: form.id,
parentId: form.parentId,
categoryName: form.categoryName,
systemId: this.systemId,
founder: 1
}
if (data.id) {
this.$post(this.api.updateModelClass, data).then(res => {
this.$message.success("编辑成功")
this.typeVisible = false
this.getType()
}).catch(res => { })
} else {
data.level = form.level
this.$post(this.api.saveReferenceCategory, data).then(res => {
this.$message.success("添加成功")
this.typeVisible = false
this.getType()
}).catch(res => { })
}
}
})
},
closeDia () {
this.$refs.Form.resetFields()
this.Form = {
id: '',
parentId: '',
categoryName: ''
}
},
//
delType (item) {
this.$confirm("确定要删除分类吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteModelClass}?categoryId=${item.id}`).then(res => {
this.$message.success("删除成功")
this.$emit('initData')
this.getType()
}).catch(res => { })
}).catch(() => { })
}
}
};
</script>
<style lang="scss" scoped>
.front-switch {
padding-bottom: 10px;
margin-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.none {
margin-top: 20px;
text-align: center;
color: #909399;
font-size: 12px;
}
</style>

@ -0,0 +1,260 @@
<template>
<div class="wrap">
<div class="side">
<org ref="tree"
@initData="initData"
@getData="getData"></org>
</div>
<div class="right">
<h6 class="p-title">筛选</h6>
<div class="tool">
<ul class="filter">
<li>
<el-input placeholder="请输入模型名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary"
round
@click="add">新增模型</el-button>
<el-button type="primary"
round
@click="batchDel">批量删除</el-button>
<el-button type="primary"
round
@click="batchOff(1)">批量禁用</el-button>
<el-button type="primary"
round
@click="batchOff(0)">批量开启</el-button>
</div>
</div>
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="modelName"
label="模型名称"
align="center"></el-table-column>
<el-table-column v-if="isTopLevel"
prop="categoryName"
label="分类"
width="150"
align="center"></el-table-column>
<el-table-column prop="modifyName"
label="编辑人"
align="center"></el-table-column>
<el-table-column prop="updateTime"
label="最新编辑时间"
width="150"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
width="100"
align="center">
<template slot-scope="scope">
{{ scope.row.postStatus ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作"
width="230">
<template slot-scope="scope">
<el-button type="text"
@click="show(scope.row)">查看</el-button>
<el-button type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
<el-switch v-if="scope.row.postStatus"
v-model="scope.row.isOpen"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
:active-text="scope.row.isOpen ? '禁用' : '启用'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
</div>
</div>
</div>
</template>
<script>
import org from "./sourceType"
export default {
data () {
return {
systemId: this.$route.query.systemId,
isTopLevel: true, //
listData: [],
keyword: "",
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
multipleSelection: []
};
},
components: {
org
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted () {
},
methods: {
//
getData () {
const curNode = this.$refs.tree.$refs.tree.getCurrentNode() //
this.isTopLevel = !curNode.level
//
if (!curNode.level) {
this.$post(this.api.getAllModelListBySys, {
modelName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize
}).then(res => {
this.listData = res.data.records
this.total = res.data.total
}).catch(res => { })
} else {
this.$post(this.api.queryTheModelOfOurSchool, {
modelName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
categoryId: curNode.id,
systemId: this.systemId
}).then(res => {
this.listData = res.data.records
this.total = res.data.total
}).catch(res => { })
}
},
initData () {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
add () {
this.$router.push(`addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&systemId=${this.systemId}`)
},
//
batchDel () {
if (this.multipleSelection.length) {
//
let ids = this.multipleSelection.map(e => e.id)
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.deleteSysModelDemo, ids).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
this.$message.error("请先选择模型 !")
}
},
//
batchOff (isOpen) {
const off = isOpen === 0
if (this.multipleSelection.length) {
//
let ids = this.multipleSelection.map(e => e.id)
this.$confirm(`确定要${off ? '启用' : '禁用'}吗?`, "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.bulkDisable}?isOpen=${isOpen}`, ids).then(res => {
this.$message.success(`${off ? '启用' : '禁用'}成功`)
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
this.$message.error("请先选择模型 !")
}
},
//
show (row) {
this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1`)
},
//
edit (row) {
this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&postStatus=${row.postStatus}`)
},
del (row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.deleteSysModelDemo, [row.id]).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
},
switchOff (val, row, index) {
this.$post(`${this.api.bulkDisable}?isOpen=${val}`, [row.id]).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功')
}).catch(res => { })
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleCurrentChange (val) {
this.page = val
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
page: val
}
})
this.getData()
}
}
};
</script>
<style lang="scss" scoped>
.wrap {
display: flex;
padding: 0 24px;
.side {
width: 300px;
padding: 24px 10px 24px 0;
margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.right {
width: calc(100% - 374px);
padding: 24px;
}
}
.el-input__inner {
height: 32px;
}
</style>

@ -0,0 +1,180 @@
<template>
<div>
<div>
<org-tree :data="orgList"
default-expand-all
ref="tree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="getSingle"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span>
<el-button v-if="node.level > 1"
type="text"
icon="el-icon-edit-outline"
@click="editType(data)">
</el-button>
<el-button type="text"
icon="el-icon-circle-plus-outline"
@click="addType(node, data)">
</el-button>
<el-button v-if="node.level > 1"
type="text"
icon="el-icon-delete"
@click="delType(data)">
</el-button>
</span>
</span>
</org-tree>
</div>
<el-dialog :title="Form.id ? '编辑分类' : '新增分类'"
:visible.sync="typeVisible"
width="24%"
center
@close="closeDia"
:close-on-click-modal="false">
<el-form ref="Form"
:model="Form"
:rules="rules">
<el-form-item prop="categoryName">
<el-input placeholder="请输入分类名称"
v-model="Form.categoryName"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button @click="typeVisible = false"> </el-button>
<el-button type="primary"
@click="submit"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import OrgTree from "@/components/org-tree/src/tree";
export default {
props: ["Data"],
data () {
return {
systemId: this.$route.query.systemId,
orgList: [],
typeVisible: false,
Form: {
id: '',
parentId: '',
categoryName: '',
level: ''
},
rules: {
categoryName: [
{ required: true, message: "请输入分类名称", trigger: "blur" }
]
}
};
},
components: {
OrgTree
},
mounted () {
this.getType()
},
methods: {
getType () {
this.$post(`${this.api.schoolModelClassification}?systemId=${this.systemId}&type=1`).then(res => {
const { data } = res
this.orgList = data
data.length && this.$nextTick(() => {
const categoryId = this.$route.query.categoryId
this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => { })
this.$emit('getData')
})
}).catch(res => { })
},
getSingle () {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey()
}
}).catch(err => { })
this.$emit('initData')
},
//
addType (node, data) {
this.typeVisible = true
this.Form.parentId = data ? data.id : 0
this.Form.level = node ? node.level : 0
},
//
editType (data) {
this.Form.id = data.id
this.Form.parentId = data ? data.parentId : 0
this.Form.categoryName = data.categoryName
this.typeVisible = true
},
//
submit () {
this.$refs['Form'].validate((valid) => {
if (valid) {
const form = this.Form
const data = {
id: form.id,
parentId: form.parentId,
categoryName: form.categoryName,
systemId: this.systemId
}
if (data.id) {
this.$post(this.api.updateSourceModelCategory, data).then(res => {
this.$message.success("编辑成功")
this.typeVisible = false
this.getType()
}).catch(res => { })
} else {
data.level = form.level
this.$post(this.api.categorySave, data).then(res => {
this.$message.success("添加成功")
this.typeVisible = false
this.getType()
}).catch(res => { })
}
}
})
},
closeDia () {
this.$refs.Form.resetFields()
this.Form = {
id: '',
parentId: '',
categoryName: ''
}
},
//
delType (item) {
this.$confirm("确定要删除分类吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.deleteSourceModelCategory}?categoryId=${item.id}`).then(res => {
this.$message.success("删除成功")
this.$emit('initData')
this.getType()
}).catch(res => { })
}).catch(() => { })
}
}
};
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,169 @@
<template>
<div>
<div class="page">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
<li>
<label>系统类型</label>
<el-select v-model="systemType"
clearable
placeholder="请选择系统类型"
@change="initData">
<el-option v-for="(item,index) in systemTypeList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</li>
<li>
<el-input placeholder="请输入系统名称"
prefix-icon="el-icon-search"
v-model.trim="systemSearch"
clearable></el-input>
</li>
</ul>
</div>
<el-table :data="systemData"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column>
<el-table-column prop="systemName"
label="系统名称"
align="center"></el-table-column>
<el-table-column prop="type"
label="系统类型"
align="center">
<template slot-scope="scope">
{{ systemTypeKeys[scope.row.type] }}
</template>
</el-table-column>
<el-table-column prop="state"
label="系统状态"
align="center">
<template slot-scope="scope">
{{ systemStatusKeys[scope.row.state] }}
</template>
</el-table-column>
<el-table-column prop="payamount"
label="系统后台"
align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toBackstage(scope.row)"
v-if="scope.row.systemId !== '11'"
v-auth="'/configure:系统后台进入'">进入</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="handleCurrentChange"
layout="total, prev, pager, next"
:total="totals">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import Setting from "@/setting";
export default {
data () {
return {
systemAttribution: "",
systemType: "",
systemSearch: "",
searchTimer: null,
systemData: [{}],
totals: 0,
systemBelongKeys: {
1: '外部产品',
0: '内部系统'
},
systemTypeList: [
{
label: "编程类",
value: 0
},
{
label: "流程类",
value: 1
}
],
systemTypeKeys: {
0: '编程类',
1: '流程类'
},
systemStatusKeys: {
0: '运行中',
1: '默认'
},
pageNo: +this.$route.query.page || 1,
pageSize: 10
};
},
watch: {
systemSearch: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted () {
this.getData();
},
methods: {
initData () {
this.pageNum = 1;
this.getData();
},
getData () {
let data = {
belong: this.systemAttribution,
type: this.systemType,
systemName: this.systemSearch,
pageNum: this.pageNo,
pageSize: this.pageSize,
supplierId: ''
};
this.$post(this.api.getAllService, data).then(res => {
this.systemData = res.serviceList.records;
this.totals = res.serviceList.total;
}).catch(res => {
});
},
handleCurrentChange (val) {
this.pageNo = val;
this.$router.push(`list?page=${val}`)
this.getData();
},
edit (row) {
this.$router.push('configure');
},
//
toBackstage (row) {
this.$router.push(`backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`)
},
}
};
</script>
<style lang="scss" scoped>
.card {
min-height: calc(100vh - 300px);
}
.mag {
margin-right: 20px;
}
</style>

@ -1,8 +1,13 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<el-collapse v-model="curStep">
<el-collapse-item v-for="(item, i) in list" :key="i" :title="item.stageName" :name="item.stageId">
<div class="page-content"
style="padding: 24px">
<el-collapse v-if="list.length"
v-model="curStep">
<el-collapse-item v-for="(item, i) in list"
:key="i"
:title="item.stageName"
:name="item.stageId">
<div class="line">
<span>比赛方式{{ item.methodName }}</span>
<span>比赛形式{{ item.competitionType ? '团队赛' : '个人赛' }}</span>
@ -10,7 +15,8 @@
<span>状态{{ item.status }}</span>
<span>竞赛起止时间{{ item.startTime + ' ~ ' + item.endTime }}</span>
<div>
<el-button type="primary" @click="toRank(item, i)">排名</el-button>
<el-button type="primary"
@click="toRank(item, i)">排名</el-button>
<el-button @click="toArch(item)">成绩管理</el-button>
</div>
</div>

@ -1,62 +1,120 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<el-card shadow="hover"
class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header v-if="grades.length" @back="$router.back()" :content="grades[index].stageName + '/排名'"></el-page-header>
<el-page-header v-if="grades.length"
@back="$router.back()"
:content="grades[index].stageName + '/排名'"></el-page-header>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="tabs">
<template v-for="(item, i) in grades">
<a v-if="i === index || !item.stageId" :key="i" class="item" :class="{active: item.stageId == active}" @click="tabChange(item.stageId)">{{ item.stageName }}排名</a>
<a v-if="i === index || !item.stageId"
:key="i"
class="item"
:class="{active: item.stageId == active}"
@click="tabChange(item.stageId)">{{ item.stageName }}排名</a>
</template>
</div>
<div class="flex-between" style="margin: 20px 0">
<div class="flex-between"
style="margin: 20px 0">
<div style="display: inline-flex;align-items: center">
<el-radio v-model="type" :label="0" @change="typeChange">默认系统排序</el-radio>
<el-radio v-model="type" :label="1" @change="typeChange">手动上传</el-radio>
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button>
<el-radio v-model="type"
:label="0"
@change="typeChange">默认系统排序</el-radio>
<el-radio v-model="type"
:label="1"
@change="typeChange">手动上传</el-radio>
<el-button type="primary"
:disabled="type === 0"
class="ml20"
@click="batchImport">上传文件</el-button>
</div>
<div>
<!-- <el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> -->
<el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<el-button v-else type="primary" @click="cancelPublish(0)">取消发布</el-button>
<el-button v-if="!published"
type="primary"
@click="cancelPublish(1)">发布排名</el-button>
<el-button v-else
type="primary"
@click="cancelPublish(0)">取消发布</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" stripe header-align="center">
<el-table-column type="index" width="60" label="排名" align="center">
<el-table :data="list"
class="table"
ref="table"
stripe
header-align="center">
<el-table-column type="index"
width="60"
label="排名"
align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<template v-if="competitionType == 1">
<el-table-column prop="teamName" label="团队名称" min-width="150" align="center"></el-table-column>
<el-table-column prop="leaderName" label="队长" min-width="150" align="center"></el-table-column>
<el-table-column prop="teamName"
label="团队名称"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="leaderName"
label="队长"
min-width="150"
align="center"></el-table-column>
</template>
<el-table-column v-else prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="timeSum" label="用时" width="90" align="center">
<el-table-column v-else
prop="userName"
label="学生姓名"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="schoolName"
label="学校"
min-width="100"
align="center"></el-table-column>
<el-table-column prop="timeSum"
label="用时"
width="90"
align="center">
<template slot-scope="scope">
{{ scope.row.timeSum + (scope.row.timeSum === '—' ? '' : 'min') }}
</template>
</el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center"></el-table-column>
<el-table-column label="得分详情" align="center" width="160">
<el-table-column prop="score"
label="分数"
width="90"
align="center"></el-table-column>
<el-table-column label="得分详情"
align="center"
width="160">
<template slot-scope="scope">
<el-button v-if="(!competitionType && scope.row.reportId) || competitionType" type="text" @click="show(scope.row, scope.$index)">查看</el-button>
<el-button v-if="(!competitionType && scope.row.reportId) || competitionType"
type="text"
@click="show(scope.row, scope.$index)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
</el-card>
<el-dialog title="团队得分详情" :visible.sync="teamVisible" width="900px" :close-on-click-modal="false">
<h6 v-if="active" style="margin-bottom: 10px;font-size: 16px;">团队名称{{ curRow.teamName }} 阶段名称{{ stageName }}</h6>
<el-dialog title="团队得分详情"
:visible.sync="teamVisible"
width="900px"
:close-on-click-modal="false">
<h6 v-if="active"
style="margin-bottom: 10px;font-size: 16px;">团队名称{{ curRow.teamName }} 阶段名称{{ stageName }}</h6>
<table class="table tc">
<tr>
<template v-if="!active">
@ -71,10 +129,12 @@
<th width="100">得分详情</th>
</tr>
<template v-if="teams.length">
<tr v-for="(item, i) in teams" :key="i">
<tr v-for="(item, i) in teams"
:key="i">
<template v-if="!active && item.rowspan">
<td :rowspan="item.rowspan">{{ item.stageName }}</td>
<td class="scores" :rowspan="item.rowspan">
<td class="scores"
:rowspan="item.rowspan">
<p class="score">{{ item.teamScore }}</p>
<p>{{ item.teamCalculationMethodName }}</p>
<p>权重</p>
@ -88,10 +148,13 @@
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button v-if="item.reportId" type="text" @click="toReport(item)">查看</el-button>
<el-button v-if="item.reportId"
type="text"
@click="toReport(item)">查看</el-button>
</td>
</template>
<td v-else colspan="6"></td>
<td v-else
colspan="6"></td>
</tr>
</template>
<tr v-else>
@ -103,18 +166,24 @@
<td colspan="6">总排名{{ curRow.index }}</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="teamVisible = false">确定</el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
type="primary"
@click="teamVisible = false">确定</el-button>
</span>
</el-dialog>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false">
<el-dialog title="批量导入"
:visible.sync="importVisible"
width="24%"
:close-on-click-modal="false">
<div style="text-align: center">
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
<el-button type="primary"
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload
ref="upload"
<el-upload ref="upload"
name="file"
accept=".xls,.xlsx"
:on-remove="handleRemove"
@ -132,15 +201,42 @@
isOverallRanking: active ? 0 : 1,
schoolId: this.$store.state.user.schoolId
}"
:auto-upload="false"
>
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
:auto-upload="false">
<el-button type="primary"
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">部分数据导入失败查看失败原因</el-link>
<el-link v-if="uploadFaild"
type="primary"
@click="showFaild">部分数据导入失败查看失败原因</el-link>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="importVisible = false"> </el-button>
<el-button size="small" type="primary" @click="uploadSure"> </el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="importVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="uploadSure"> </el-button>
</span>
</el-dialog>
<el-dialog title="请选择发布排名时间"
:visible.sync="publishVisible"
width="260px"
:close-on-click-modal="false"
custom-class="publish-dia">
<el-date-picker popper-class="no-atTheMoment"
v-model="publishTime"
placeholder="请选择结束时间"
type="datetime"
:picker-options="pickerOptions">
</el-date-picker>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="publishVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="publishSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -197,7 +293,23 @@ export default {
totalScore: 0,
published: false,
uploadData: [],
sourceType: ''
sourceType: '',
publishVisible: false,
publishTime: '',
pickerOptions: {
//
disabledDate (time) {
return time.getTime() < Date.now() - 8.64e7;
},
//
selectableRange: (() => {
let data = new Date();
let hour = data.getHours();
let minute = data.getMinutes();
let second = data.getSeconds();
return [`${hour}:${minute}:${second} - 23:59:59`]
})(),
}
};
},
mounted () {
@ -475,6 +587,10 @@ export default {
this.publishSubmit()
}).catch(res => { })
// this.publishSubmit()
},
//
publishSubmit () {
},
//
cancelPublish (publish) {
@ -488,7 +604,9 @@ export default {
//
if (publish) {
// this.type ?
this.publish()
// this.publish()
this.publishTime = new Date()
this.publishVisible = true
// this.$post(this.api.deleteLastPublication, {
// competitionId: this.id,
// isOverallRanking: this.active ? 0 : 1,
@ -567,7 +685,7 @@ export default {
this.$refs.upload.submit()
}).catch(res => { }) :
this.$refs.upload.submit()
}
},
}
};
</script>
@ -576,7 +694,8 @@ export default {
.table {
width: 100%;
border-collapse: collapse;
th, td {
th,
td {
padding: 12px;
border: 1px solid #ebeef5;
}
@ -593,7 +712,7 @@ export default {
.score {
font-size: 16px;
font-weight: 600;
color: #9076FF;
color: #9076ff;
}
}
</style>

@ -163,7 +163,7 @@ export default {
data () {
const that = this
return {
carouselHeight: '350px',
carouselHeight: '533px',
banners: [],
timer: null,
curTab: '',
@ -304,7 +304,7 @@ export default {
}
},
mounted () {
this.carouselHeight = parseInt(window.innerWidth / 5.48) + 'px'
this.carouselHeight = parseInt(window.innerWidth / 3.6) + 'px'
this.getBanner()
this.getSubject()
this.getLabel()

@ -9,16 +9,23 @@
</el-card>
<div class="inner">
<div class="top">
<div v-if="form.interfaceDiagrams && height"
class="pics"
:style="{height: form.interfaceDiagrams.length === 1 ? height: 'auto'}">
<el-image class="pic"
<div class="pics"
v-if="form.mall.coverDrawing">
<el-image :class="['cover', {full: !form.interfaceDiagrams}]"
:src="form.mall.coverDrawing"
:preview-src-list="form.pics">
</el-image>
<div v-if="form.interfaceDiagrams"
class="interface">
<div class="pic"
v-for="(pic, i) in form.interfaceDiagrams"
:key="i"
:src="pic"
:preview-src-list="form.interfaceDiagrams">
:key="i">
<el-image :src="pic"
:preview-src-list="form.pics">
</el-image>
</div>
</div>
</div>
<div class="right"
id="fields">
<h6>{{ form.mall.productName }}</h6>
@ -184,7 +191,9 @@ export default {
],
form: {
classificationIds: [],
mall: {},
mall: {
coverDrawing: ''
},
goodsRes: {}
},
chapterList: [],
@ -229,9 +238,12 @@ export default {
getData () {
this.$get(`${this.api.detailsOfGoods}?mallId=${this.id}`).then(res => {
const e = res.orderDetails
// +
e.interfaceDiagrams = [e.mall.coverDrawing]
if (e.mall.interfaceDiagram) e.interfaceDiagrams.push(...e.mall.interfaceDiagram.split(',').slice(0, 3))
e.pics = [e.mall.coverDrawing]
if (e.mall.interfaceDiagram) {
const pics = e.mall.interfaceDiagram.split(',').slice(0, 3)
e.pics.push(...pics)
e.interfaceDiagrams = pics
}
this.form = e
this.chapterList = ''
e.mall.associatedProduct && this.getChapter()
@ -316,7 +328,7 @@ export default {
.wrap {
background: #f3f6fa;
.inner {
width: 1154px;
width: 1146px;
margin: 0 auto;
}
.top {
@ -325,31 +337,37 @@ export default {
background-color: #fff;
border-radius: 10px;
.pics {
width: 436px;
margin-right: 24px;
.pic {
width: 140px;
height: 62px;
margin-right: 8px;
display: flex;
flex-wrap: wrap;
width: 502px;
margin-right: 20px;
.cover {
width: 370px;
height: 278px;
margin-right: 10px;
border-radius: 8px;
&:first-child {
overflow: hidden;
&.full {
width: 100%;
height: 192px;
margin-bottom: 12px;
}
&:last-child {
margin-right: 0;
}
&:only-child {
// max-height: 266px;
// height: auto;
.pic {
width: 114px;
height: 86px;
margin-bottom: 10px;
border-radius: 8px;
overflow: hidden;
.el-image {
width: 100%;
height: 100%;
margin: 0;
}
&:last-child {
margin-bottom: 0;
}
}
}
.right {
width: 646px;
width: 592px;
overflow: hidden;
}
h6 {

@ -176,6 +176,7 @@
</el-form-item>
</el-form>
<div class="text-right">
<el-button @click="showNoteAdd = false">取消</el-button>
<el-button type="primary"
@click="submitNote">保存</el-button>
</div>
@ -875,7 +876,7 @@ $height: 700px;
margin-right: 10px;
}
&:hover {
background-color: #528adf;
background-color: #ac89fd;
}
&.active {
background-color: $main-color;
@ -911,7 +912,6 @@ $height: 700px;
}
.list {
height: calc(700px - 70px);
overflow-y: auto;
padding: 24px 16px;
background: #fff;
.title {
@ -966,7 +966,7 @@ $height: 700px;
}
.chapters {
margin-top: 16px;
max-height: calc(100% - 53px);
max-height: calc(100% - 138px);
overflow: auto;
}
.chapter {

@ -0,0 +1,35 @@
import BasicLayout from "@/layouts/home";
const meta = {};
const pre = "expSystem-";
export default {
path: "/expSystem",
name: "expSystem",
redirect: {
name: `${pre}list`
},
meta,
component: BasicLayout,
children: [
{
name: `${pre}list`,
path: `list`,
component: () => import("@/pages/expSystem/list"),
meta: { title: "实验系统管理" }
},
{
name: `${pre}backstage`,
path: `backstage`,
component: () => import("@/pages/expSystem/backstage"),
meta: { title: "系统后台" }
},
{
name: `${pre}addModel`,
path: `addModel`,
component: () => import("@/pages/expSystem/backstage/addModel"),
meta: { title: "新增源模型" }
}
]
};

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.151:9000/"; // 榕
host = "http://192.168.31.152:9000/"; // 榕
// host = 'http://192.168.31.52:9000/'; // 赓
}
@ -87,7 +87,7 @@ const Setting = {
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: true,
dynamicRoute: false,
// 文件上传
upload: {
apiURL: uploadURL,

Loading…
Cancel
Save