master
parent
3bf173d9c0
commit
48b35dc835
|
@ -11,6 +11,7 @@
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"element-plus": "^1.3.0-beta.1",
|
"element-plus": "^1.3.0-beta.1",
|
||||||
|
"qiniu-js": "^3.4.0",
|
||||||
"vue": "^3.2.0",
|
"vue": "^3.2.0",
|
||||||
"vue-axios": "^3.4.0",
|
"vue-axios": "^3.4.0",
|
||||||
"vue-router": "^4.0.12"
|
"vue-router": "^4.0.12"
|
||||||
|
@ -1597,6 +1598,25 @@
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@babel/runtime-corejs2": {
|
||||||
|
"version": "7.16.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@babel/runtime-corejs2/download/@babel/runtime-corejs2-7.16.7.tgz",
|
||||||
|
"integrity": "sha512-ec0BM0J/9M5Cncha++AlgvvDlk+uM+m6f7K0t74ClcYzsE8LgX4RstRreksMSCI82o3LJS//UswmA0pUWkJpqg==",
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": "^2.6.5",
|
||||||
|
"regenerator-runtime": "^0.13.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/runtime-corejs2/node_modules/core-js": {
|
||||||
|
"version": "2.6.12",
|
||||||
|
"resolved": "https://registry.npmmirror.com/core-js/download/core-js-2.6.12.tgz",
|
||||||
|
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
|
||||||
|
"deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.",
|
||||||
|
"hasInstallScript": true
|
||||||
|
},
|
||||||
"node_modules/@babel/template": {
|
"node_modules/@babel/template": {
|
||||||
"version": "7.16.7",
|
"version": "7.16.7",
|
||||||
"resolved": "https://registry.npmmirror.com/@babel/template/download/@babel/template-7.16.7.tgz",
|
"resolved": "https://registry.npmmirror.com/@babel/template/download/@babel/template-7.16.7.tgz",
|
||||||
|
@ -11373,6 +11393,26 @@
|
||||||
"teleport": ">=0.2.0"
|
"teleport": ">=0.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/qiniu-js": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/qiniu-js/download/qiniu-js-3.4.0.tgz",
|
||||||
|
"integrity": "sha1-NpgN4HvkurIp7AGToywzGKokt0g=",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime-corejs2": "^7.10.2",
|
||||||
|
"querystring": "^0.2.1",
|
||||||
|
"spark-md5": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/qiniu-js/node_modules/querystring": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/querystring/download/querystring-0.2.1.tgz",
|
||||||
|
"integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==",
|
||||||
|
"deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.5.2",
|
"version": "6.5.2",
|
||||||
"resolved": "https://registry.npmmirror.com/qs/download/qs-6.5.2.tgz",
|
"resolved": "https://registry.npmmirror.com/qs/download/qs-6.5.2.tgz",
|
||||||
|
@ -11551,8 +11591,7 @@
|
||||||
"node_modules/regenerator-runtime": {
|
"node_modules/regenerator-runtime": {
|
||||||
"version": "0.13.9",
|
"version": "0.13.9",
|
||||||
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz",
|
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz",
|
||||||
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=",
|
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/regenerator-transform": {
|
"node_modules/regenerator-transform": {
|
||||||
"version": "0.14.5",
|
"version": "0.14.5",
|
||||||
|
@ -12584,6 +12623,11 @@
|
||||||
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=",
|
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/spark-md5": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/spark-md5/download/spark-md5-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw=="
|
||||||
|
},
|
||||||
"node_modules/spdx-correct": {
|
"node_modules/spdx-correct": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.nlark.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
|
"resolved": "https://registry.nlark.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
|
||||||
|
@ -16388,6 +16432,22 @@
|
||||||
"regenerator-runtime": "^0.13.4"
|
"regenerator-runtime": "^0.13.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/runtime-corejs2": {
|
||||||
|
"version": "7.16.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@babel/runtime-corejs2/download/@babel/runtime-corejs2-7.16.7.tgz",
|
||||||
|
"integrity": "sha512-ec0BM0J/9M5Cncha++AlgvvDlk+uM+m6f7K0t74ClcYzsE8LgX4RstRreksMSCI82o3LJS//UswmA0pUWkJpqg==",
|
||||||
|
"requires": {
|
||||||
|
"core-js": "^2.6.5",
|
||||||
|
"regenerator-runtime": "^0.13.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "2.6.12",
|
||||||
|
"resolved": "https://registry.npmmirror.com/core-js/download/core-js-2.6.12.tgz",
|
||||||
|
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@babel/template": {
|
"@babel/template": {
|
||||||
"version": "7.16.7",
|
"version": "7.16.7",
|
||||||
"resolved": "https://registry.npmmirror.com/@babel/template/download/@babel/template-7.16.7.tgz",
|
"resolved": "https://registry.npmmirror.com/@babel/template/download/@babel/template-7.16.7.tgz",
|
||||||
|
@ -24504,6 +24564,23 @@
|
||||||
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"qiniu-js": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/qiniu-js/download/qiniu-js-3.4.0.tgz",
|
||||||
|
"integrity": "sha1-NpgN4HvkurIp7AGToywzGKokt0g=",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime-corejs2": "^7.10.2",
|
||||||
|
"querystring": "^0.2.1",
|
||||||
|
"spark-md5": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"querystring": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/querystring/download/querystring-0.2.1.tgz",
|
||||||
|
"integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.5.2",
|
"version": "6.5.2",
|
||||||
"resolved": "https://registry.npmmirror.com/qs/download/qs-6.5.2.tgz",
|
"resolved": "https://registry.npmmirror.com/qs/download/qs-6.5.2.tgz",
|
||||||
|
@ -24650,8 +24727,7 @@
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.9",
|
"version": "0.13.9",
|
||||||
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz",
|
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz",
|
||||||
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=",
|
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"regenerator-transform": {
|
"regenerator-transform": {
|
||||||
"version": "0.14.5",
|
"version": "0.14.5",
|
||||||
|
@ -25537,6 +25613,11 @@
|
||||||
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=",
|
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"spark-md5": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/spark-md5/download/spark-md5-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw=="
|
||||||
|
},
|
||||||
"spdx-correct": {
|
"spdx-correct": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.nlark.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
|
"resolved": "https://registry.nlark.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"element-plus": "^1.3.0-beta.1",
|
"element-plus": "^1.3.0-beta.1",
|
||||||
|
"qiniu-js": "^3.4.0",
|
||||||
"vue": "^3.2.0",
|
"vue": "^3.2.0",
|
||||||
"vue-axios": "^3.4.0",
|
"vue-axios": "^3.4.0",
|
||||||
"vue-router": "^4.0.12"
|
"vue-router": "^4.0.12"
|
||||||
|
|
|
@ -10,6 +10,7 @@ import axios from 'axios'
|
||||||
import VueAxios from 'vue-axios'
|
import VueAxios from 'vue-axios'
|
||||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||||
axios.defaults.baseURL='https://a99zg89a.xiaomy.net'
|
axios.defaults.baseURL='https://a99zg89a.xiaomy.net'
|
||||||
|
|
||||||
axios.interceptors.request.use(config => {
|
axios.interceptors.request.use(config => {
|
||||||
|
|
||||||
config.headers.Authorization = "Basic c2FiZXI6c2FiZXJfc2VjcmV0"
|
config.headers.Authorization = "Basic c2FiZXI6c2FiZXJfc2VjcmV0"
|
||||||
|
@ -19,6 +20,7 @@ axios.interceptors.request.use(config => {
|
||||||
return config
|
return config
|
||||||
})
|
})
|
||||||
let app=createApp(App)
|
let app=createApp(App)
|
||||||
|
app.config.globalProperties.$bucketName = "nianhua-test"
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.use(ElementPlus,{locale:zhCn});
|
app.use(ElementPlus,{locale:zhCn});
|
||||||
app.use(VueAxios,axios)
|
app.use(VueAxios,axios)
|
||||||
|
|
|
@ -10,6 +10,8 @@ import index from '../view/index.vue'
|
||||||
import consumer from '../view/consumer.vue'
|
import consumer from '../view/consumer.vue'
|
||||||
import projectManagement from '../view/projectManagement.vue'
|
import projectManagement from '../view/projectManagement.vue'
|
||||||
import projectTopic from '../view/projectTopic.vue'
|
import projectTopic from '../view/projectTopic.vue'
|
||||||
|
import generateTest from '../view/generateTest.vue'
|
||||||
|
|
||||||
//配置路由
|
//配置路由
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
|
@ -38,7 +40,12 @@ const router = createRouter({
|
||||||
name: 'projectTopic',
|
name: 'projectTopic',
|
||||||
component: projectTopic
|
component: projectTopic
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
path: '/generateTest', //
|
||||||
|
name: 'generateTest',
|
||||||
|
component: generateTest
|
||||||
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
// 导出router
|
// 导出router
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
<!-- <template>
|
||||||
|
<div >
|
||||||
|
<p>新建测试 </p>
|
||||||
|
|
||||||
|
<div class="generateTest">
|
||||||
|
<p class="tit">测试信息</p>
|
||||||
|
|
||||||
|
<div class="generateTestCon">
|
||||||
|
<div class="inputCss">
|
||||||
|
<p>问题</p>
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
class="w-50 m-2"
|
||||||
|
size="large"
|
||||||
|
placeholder="请输入问题"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
props: {
|
||||||
|
msg: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.generateTest{
|
||||||
|
min-height: 50vh;
|
||||||
|
background: #f8fafb;
|
||||||
|
border-radius: 3px;
|
||||||
|
width: 80%;
|
||||||
|
margin:auto;
|
||||||
|
margin-top: 30px;
|
||||||
|
|
||||||
|
border: 1px solid #dde3e8;
|
||||||
|
|
||||||
|
}
|
||||||
|
.generateTest .tit{
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #454d67;
|
||||||
|
padding-top: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 40px;
|
||||||
|
border-bottom: 1px solid #e4eaee;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-bottom: 60px;}
|
||||||
|
|
||||||
|
|
||||||
|
.inputCss>p{
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #8e8e8e;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
.inputCss>div{
|
||||||
|
width: 300px
|
||||||
|
;
|
||||||
|
}
|
||||||
|
.generateTestCon{
|
||||||
|
padding:0 40px 40px 40px;}
|
||||||
|
</style> -->
|
|
@ -0,0 +1,36 @@
|
||||||
|
<template>
|
||||||
|
<div class="consumer">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavLeft from "../components/nav.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavLeft,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
msg: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.consumer{
|
||||||
|
width: 100%;
|
||||||
|
min-height: 60vh;
|
||||||
|
padding-top: 30px;
|
||||||
|
background: #f8fafb;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #dde3e8;
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -24,10 +24,26 @@
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<p>当前已选择:</p>
|
<p>当前已选择:</p>
|
||||||
<p>题型1:<span>40</span>题</p>
|
<p>
|
||||||
<p>题型2:<span>40</span>题</p>
|
题型1:<span>{{ libraryType1CountData.libraryType1Count }}</span
|
||||||
<p>题型3:<span>40</span>题</p>
|
>题
|
||||||
<p>题型4:<span>40</span>题</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
题型2:<span>{{ libraryType1CountData.libraryType2Count }}</span
|
||||||
|
>题
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
题型3:<span>{{ libraryType1CountData.libraryType3Count }}</span
|
||||||
|
>题
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
题型4:<span>{{ libraryType1CountData.libraryType4Count }}</span
|
||||||
|
>题
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button class="buttonCss" type="button" @click="generateTest()">
|
||||||
|
生成测试
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -62,39 +78,33 @@
|
||||||
<div class="projectTopicAButton">
|
<div class="projectTopicAButton">
|
||||||
<div class="projectTopicAButtonSearch">
|
<div class="projectTopicAButtonSearch">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="input2"
|
v-model="inputData"
|
||||||
class="w-50 m-2"
|
class="w-50 m-2"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:prefix-icon="Search"
|
:prefix-icon="Search"
|
||||||
/>
|
/>
|
||||||
|
<button class="buttonCss" @click="inputDataFun()" type="button">
|
||||||
|
搜索
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="buttonCss" type="button">随机选题</button>
|
<button class="buttonCss" type="button" @click="randomlyTopic()">
|
||||||
<button class="buttonCss" type="button">取消选题</button>
|
随机选题
|
||||||
<button class="buttonCss" @click="addProject()" type="button">
|
|
||||||
新建
|
|
||||||
</button>
|
</button>
|
||||||
|
<button class="buttonCss" @click="cancelTopic()" type="button">
|
||||||
|
取消选题
|
||||||
|
</button>
|
||||||
|
<button class="buttonCss" type="button">新建</button>
|
||||||
<button class="buttonCss" type="button">批量导入</button>
|
<button class="buttonCss" type="button">批量导入</button>
|
||||||
|
|
||||||
<button class="buttonCss" type="button">下载导入模板</button>
|
<button class="buttonCss" type="button">下载导入模板</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="projectTopicTable">
|
<div class="projectTopicTable">
|
||||||
<el-table :data="tableData" style="width: 100%" max-height="500">
|
<el-table :data="tableData" style="width: 100%" max-height="500">
|
||||||
<el-table-column
|
<el-table-column align="center" prop="id" label="序号" />
|
||||||
align="center"
|
<el-table-column align="center" prop="topic" label="题目" />
|
||||||
fixed
|
<el-table-column align="center" fixed="right" label="选择状态">
|
||||||
prop="companyName"
|
|
||||||
label="创建部门"
|
|
||||||
/>
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column align="center" prop="date" label="创建时间" />
|
|
||||||
<el-table-column align="center" prop="name" label="项目" />
|
|
||||||
<el-table-column align="center" prop="address" label="备注" />
|
|
||||||
<el-table-column align="center" prop="testCount" label="数量" />
|
|
||||||
<el-table-column align="center" fixed="right" label="状态">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.status == 0">已启用</div>
|
<div v-if="scope.row.isSelect == 0">未选</div>
|
||||||
<div v-else>已禁用</div>
|
<div v-else>已选用</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" fixed="right" label="操作">
|
<el-table-column align="center" fixed="right" label="操作">
|
||||||
|
@ -102,24 +112,17 @@
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
@click.prevent="open(scope, 1)"
|
@click.prevent="open(scope)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
@click.prevent="open(scope, 2)"
|
|
||||||
>
|
|
||||||
停用
|
|
||||||
</el-button>
|
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
@click.prevent="topicNav(scope)"
|
@click.prevent="editTitle(scope)"
|
||||||
>
|
>
|
||||||
编辑题库
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -129,9 +132,8 @@
|
||||||
background
|
background
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page="currentPage4"
|
|
||||||
layout="prev, pager, next, jumper"
|
layout="prev, pager, next, jumper"
|
||||||
:total="2"
|
:total="total"
|
||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +141,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
// 题型1
|
<!-- // 题型1 -->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
title="编辑问题"
|
title="编辑问题"
|
||||||
|
@ -156,7 +158,30 @@
|
||||||
placeholder="请输入问题"
|
placeholder="请输入问题"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 题目类型 -->
|
||||||
|
<div class="selectClass" v-if="topicType == 2 || topicType == 4">
|
||||||
|
<div v-for="item in selectClassData" :key="item.dictValue">
|
||||||
|
{{ item.dictValue }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-model="topicData.topicType"
|
||||||
|
class="m-2"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in selectClassData"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictKey"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<!-- 问题 -->
|
||||||
<p class="tit">答案</p>
|
<p class="tit">答案</p>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<p @click="options(1)" :class="[optionsIf == 1 ? 'optionsIf' : '']">
|
<p @click="options(1)" :class="[optionsIf == 1 ? 'optionsIf' : '']">
|
||||||
|
@ -200,89 +225,171 @@
|
||||||
size="large"
|
size="large"
|
||||||
placeholder="请输入选项内容"
|
placeholder="请输入选项内容"
|
||||||
></el-input>
|
></el-input>
|
||||||
|
<!-- 问题对类型 -->
|
||||||
<div class="selectClass" v-if="optionsIf == 1">
|
<div v-if="topicType == 1 || topicType == 3">
|
||||||
<p>选择对应类型</p>
|
<div class="selectClass" v-if="optionsIf == 1">
|
||||||
<el-select
|
<p>选择对应类型</p>
|
||||||
v-model="topicData.options[0].topicType"
|
<el-select
|
||||||
class="m-2"
|
v-model="topicData.options[0].topicType"
|
||||||
placeholder="请选择类型"
|
class="m-2"
|
||||||
size="large"
|
placeholder="请选择类型"
|
||||||
>
|
size="large"
|
||||||
<el-option
|
|
||||||
v-for="item in selectClassData"
|
|
||||||
:key="item.dictValue"
|
|
||||||
:label="item.dictValue"
|
|
||||||
:value="item.dictValue"
|
|
||||||
>
|
>
|
||||||
</el-option>
|
<el-option
|
||||||
</el-select>
|
v-for="item in selectClassData"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictKey"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="selectClass" v-if="optionsIf == 2">
|
||||||
|
<p>选择对应类型</p>
|
||||||
|
<el-select
|
||||||
|
v-model="topicData.options[1].topicType"
|
||||||
|
class="m-2"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in selectClassData"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictKey"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="selectClass" v-if="optionsIf == 3">
|
||||||
|
<p>选择对应类型</p>
|
||||||
|
<el-select
|
||||||
|
v-model="topicData.options[2].topicType"
|
||||||
|
class="m-2"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in selectClassData"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictKey"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="selectClass" v-if="optionsIf == 4">
|
||||||
|
<p>选择对应类型</p>
|
||||||
|
<el-select
|
||||||
|
v-model="topicData.options[3].topicType"
|
||||||
|
class="m-2"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in selectClassData"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictValue"
|
||||||
|
:value="item.dictKey"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="selectClass" v-if="optionsIf == 2">
|
<div class="selectClass" v-if="topicType == 2 || topicType == 3">
|
||||||
<p>选择对应类型</p>
|
<p>该选项对应分数</p>
|
||||||
<el-select
|
<div>
|
||||||
v-model="topicData.options[1].topicType"
|
<el-input
|
||||||
class="m-2"
|
v-model="topicData.score"
|
||||||
placeholder="请选择类型"
|
class="w-50 m-2"
|
||||||
size="large"
|
size="large"
|
||||||
>
|
placeholder="请输入分数"
|
||||||
<el-option
|
></el-input>
|
||||||
v-for="item in selectClassData"
|
</div>
|
||||||
:key="item.dictValue"
|
|
||||||
:label="item.dictValue"
|
|
||||||
:value="item.dictValue"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="selectClass" v-if="optionsIf == 3">
|
|
||||||
<p>选择对应类型</p>
|
|
||||||
<el-select
|
|
||||||
v-model="topicData.options[2].topicType"
|
|
||||||
class="m-2"
|
|
||||||
placeholder="请选择类型"
|
|
||||||
size="large"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in selectClassData"
|
|
||||||
:key="item.dictValue"
|
|
||||||
:label="item.dictValue"
|
|
||||||
:value="item.dictValue"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div class="selectClass" v-if="optionsIf == 4">
|
|
||||||
<p>选择对应类型</p>
|
|
||||||
<el-select
|
|
||||||
v-model="topicData.options[3].topicType"
|
|
||||||
class="m-2"
|
|
||||||
placeholder="请选择类型"
|
|
||||||
size="large"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in selectClassData"
|
|
||||||
:key="item.dictValue"
|
|
||||||
:label="item.dictValue"
|
|
||||||
:value="item.dictValue"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="drawerButton">
|
<div class="drawerButton">
|
||||||
<el-button type="primary" @click="addprojectTopic()"
|
<el-button
|
||||||
>新建项目</el-button
|
type="primary"
|
||||||
|
v-if="buttonDataIF"
|
||||||
|
@click="addprojectTopic()"
|
||||||
|
>新建问题</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="resetForm(ruleFormRef)">取消新建</el-button>
|
<el-button type="primary" v-else @click="updTopic()"
|
||||||
|
>编辑问题</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="resetForm(ruleFormRef)">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
v-model="generateTestIf"
|
||||||
|
title="编辑问题"
|
||||||
|
:direction="direction"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
<div class="elementUldrawer">
|
||||||
|
<div class="nameProject">
|
||||||
|
<p class="tit">项目名称:</p>
|
||||||
|
<p>{{ generateTestData.name }}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="tit">发起单位</p>
|
||||||
|
<el-input
|
||||||
|
v-model="generateTestData.companyName"
|
||||||
|
class="w-50 m-2"
|
||||||
|
size="large"
|
||||||
|
placeholder="请输入单位"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="tit">答题时长</p>
|
||||||
|
<el-input
|
||||||
|
v-model="generateTestData.testDuration"
|
||||||
|
class="w-50 m-2"
|
||||||
|
size="large"
|
||||||
|
placeholder="请输入问题"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="tit">测试说明</p>
|
||||||
|
|
||||||
|
<el-input
|
||||||
|
v-model="generateTestData.note"
|
||||||
|
:autosize="{ minRows: 6, maxRows: 4 }"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入测试说明"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="tit">测试封面</p>
|
||||||
|
<div class="imgFm">
|
||||||
|
<input type="file" @change="upLoad($event)" />
|
||||||
|
<img :src="imgData" alt="" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="tit">只允许添加该测试白名单的人参加测试</p>
|
||||||
|
<el-switch v-model="generateTestData.isAllowWhiteList" />
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<el-button type="primary" @click="determineGenerateTest()"
|
||||||
|
>确定</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button>取消</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavLeft from "../components/nav.vue";
|
import NavLeft from "../components/nav.vue";
|
||||||
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
|
import * as qiniu from "qiniu-js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -294,15 +401,38 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
|
generateTestIf: false,
|
||||||
topicType: 1,
|
topicType: 1,
|
||||||
|
total: "",
|
||||||
|
fileImgData: "",
|
||||||
|
generateTestData: {
|
||||||
|
name: "",
|
||||||
|
companyName: "",
|
||||||
|
projectId: "",
|
||||||
|
note: "",
|
||||||
|
coverImg: "",
|
||||||
|
isAllowWhiteList: false,
|
||||||
|
testDuration: "",
|
||||||
|
},
|
||||||
|
|
||||||
|
inputData: "",
|
||||||
|
libraryType1CountData: {
|
||||||
|
libraryType1Count: 0,
|
||||||
|
libraryType2Count: 0,
|
||||||
|
libraryType3Count: 0,
|
||||||
|
libraryType4Count: 0,
|
||||||
|
},
|
||||||
|
buttonDataIF: true,
|
||||||
TopicPageData: {
|
TopicPageData: {
|
||||||
current: 1,
|
current: 1,
|
||||||
libraryType: "topic_type_1",
|
libraryType: "topic_type_1",
|
||||||
size: 5,
|
size: 10,
|
||||||
|
projectId: "",
|
||||||
},
|
},
|
||||||
topicData: {
|
topicData: {
|
||||||
createTime: "",
|
createTime: "",
|
||||||
projectId: "",
|
projectId: "",
|
||||||
|
score: "",
|
||||||
libraryType: "topic_type_1",
|
libraryType: "topic_type_1",
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
|
@ -310,9 +440,9 @@ export default {
|
||||||
createTime: "",
|
createTime: "",
|
||||||
|
|
||||||
libraryType: "",
|
libraryType: "",
|
||||||
optionIndex: 0,
|
optionIndex: "",
|
||||||
optionIndexEn: "",
|
optionIndexEn: "",
|
||||||
score: 0,
|
score: "",
|
||||||
topicId: 0,
|
topicId: 0,
|
||||||
topicType: "",
|
topicType: "",
|
||||||
topicTypeValue: "",
|
topicTypeValue: "",
|
||||||
|
@ -320,11 +450,11 @@ export default {
|
||||||
{
|
{
|
||||||
content: "",
|
content: "",
|
||||||
createTime: "",
|
createTime: "",
|
||||||
id: 0,
|
id: "",
|
||||||
libraryType: "",
|
libraryType: "",
|
||||||
optionIndex: 0,
|
optionIndex: "",
|
||||||
optionIndexEn: "",
|
optionIndexEn: "",
|
||||||
score: 0,
|
score: "",
|
||||||
topicId: 0,
|
topicId: 0,
|
||||||
topicType: "",
|
topicType: "",
|
||||||
topicTypeValue: "",
|
topicTypeValue: "",
|
||||||
|
@ -332,11 +462,11 @@ export default {
|
||||||
{
|
{
|
||||||
content: "",
|
content: "",
|
||||||
createTime: "",
|
createTime: "",
|
||||||
id: 0,
|
id: "",
|
||||||
libraryType: "",
|
libraryType: "",
|
||||||
optionIndex: 0,
|
optionIndex: "",
|
||||||
optionIndexEn: "",
|
optionIndexEn: "",
|
||||||
score: 0,
|
score: "",
|
||||||
topicId: 0,
|
topicId: 0,
|
||||||
topicType: "",
|
topicType: "",
|
||||||
topicTypeValue: "",
|
topicTypeValue: "",
|
||||||
|
@ -344,11 +474,11 @@ export default {
|
||||||
{
|
{
|
||||||
content: "",
|
content: "",
|
||||||
createTime: "",
|
createTime: "",
|
||||||
id: 0,
|
id: "",
|
||||||
libraryType: "",
|
libraryType: "",
|
||||||
optionIndex: 0,
|
optionIndex: "",
|
||||||
optionIndexEn: "",
|
optionIndexEn: "",
|
||||||
score: 0,
|
score: "",
|
||||||
topicId: 0,
|
topicId: 0,
|
||||||
topicType: "",
|
topicType: "",
|
||||||
topicTypeValue: "",
|
topicTypeValue: "",
|
||||||
|
@ -357,6 +487,7 @@ export default {
|
||||||
topic: "",
|
topic: "",
|
||||||
topicType: "",
|
topicType: "",
|
||||||
},
|
},
|
||||||
|
imgData: "https://nianhua.test.joymido.com/",
|
||||||
projectData: {},
|
projectData: {},
|
||||||
labelPosition: "top",
|
labelPosition: "top",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
@ -368,12 +499,116 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.projectData = JSON.parse(localStorage.topicData);
|
this.projectData = JSON.parse(localStorage.topicData);
|
||||||
|
console.log(this.projectData);
|
||||||
|
this.generateTestData.name = this.projectData.name;
|
||||||
|
this.generateTestData.companyName = this.projectData.companyName;
|
||||||
this.getProject();
|
this.getProject();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 分页
|
||||||
|
|
||||||
|
upLoad(e) {
|
||||||
|
let that = this;
|
||||||
|
let key = null;
|
||||||
|
this.axios
|
||||||
|
|
||||||
|
.get("http://101.200.157.76:12306/ding/file/getQiniuToken", {
|
||||||
|
params: { bucketName: "nianhua-test" },
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
var config = {
|
||||||
|
useCdnDomain: true,
|
||||||
|
};
|
||||||
|
// 设置文件的配置
|
||||||
|
var putExtra = {
|
||||||
|
fname: "",
|
||||||
|
params: {},
|
||||||
|
mimeType: null,
|
||||||
|
};
|
||||||
|
console.log(e.target.files[0], data.data.data.token);
|
||||||
|
let observable = qiniu.upload(
|
||||||
|
e.target.files[0],
|
||||||
|
key,
|
||||||
|
data.data.data.token,
|
||||||
|
putExtra,
|
||||||
|
config
|
||||||
|
);
|
||||||
|
// var observable = qiniu.upload({ file, key, token, putExtra, config })
|
||||||
|
// 设置实例的监听对象
|
||||||
|
var observer = {
|
||||||
|
// 接收上传进度信息
|
||||||
|
// 接收上传错误信息
|
||||||
|
error(err) {
|
||||||
|
console.log(err);
|
||||||
|
},
|
||||||
|
complete(res) {
|
||||||
|
that.imgData += res.key;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
// 上传开始
|
||||||
|
observable.subscribe(observer);
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange(data) {
|
||||||
|
this.TopicPageData.current = data;
|
||||||
|
this.getProject();
|
||||||
|
},
|
||||||
|
|
||||||
options(num) {
|
options(num) {
|
||||||
this.optionsIf = num;
|
this.optionsIf = num;
|
||||||
},
|
},
|
||||||
|
// 搜索
|
||||||
|
inputDataFun() {
|
||||||
|
this.getProject(this.inputData);
|
||||||
|
},
|
||||||
|
// 新建测试
|
||||||
|
generateTest() {
|
||||||
|
this.generateTestIf = true;
|
||||||
|
},
|
||||||
|
// 确定新增测试
|
||||||
|
determineGenerateTest() {
|
||||||
|
this.generateTestData.coverImg = this.imgData;
|
||||||
|
if (this.generateTestData.isAllowWhiteList) {
|
||||||
|
this.generateTestData.isAllowWhiteList = "1";
|
||||||
|
} else {
|
||||||
|
this.generateTestData.isAllowWhiteList = "0";
|
||||||
|
}
|
||||||
|
console.log();
|
||||||
|
this.axios
|
||||||
|
.post("hysc/test/addTest",this.generateTestData)
|
||||||
|
.then(function (data) {
|
||||||
|
console.log(data)
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除提示
|
||||||
|
open(obj) {
|
||||||
|
let that = this;
|
||||||
|
ElMessageBox.confirm("是否确定删除", {
|
||||||
|
confirmButtonText: "取消",
|
||||||
|
cancelButtonText: "确定",
|
||||||
|
type: "提示",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: "delet",
|
||||||
|
message: "已取消",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
that.projectTopicDelete(obj.row.id);
|
||||||
|
ElMessage({
|
||||||
|
type: "tiyong",
|
||||||
|
message: "删除成功",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 题库切换
|
||||||
topicTypes(num) {
|
topicTypes(num) {
|
||||||
this.topicType = num;
|
this.topicType = num;
|
||||||
if (this.topicType == 1) {
|
if (this.topicType == 1) {
|
||||||
|
@ -389,10 +624,98 @@ export default {
|
||||||
this.TopicPageData.libraryType = "topic_type_4";
|
this.TopicPageData.libraryType = "topic_type_4";
|
||||||
this.topicData.libraryType = "topic_type_4";
|
this.topicData.libraryType = "topic_type_4";
|
||||||
}
|
}
|
||||||
|
this.getProject();
|
||||||
|
},
|
||||||
|
projectTopicDelete(id) {
|
||||||
|
let that = this;
|
||||||
|
this.axios
|
||||||
|
.post("/hysc/library/delTopic", {
|
||||||
|
id: id,
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
that.getProject();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
editTitle(data) {
|
||||||
|
this.addCation();
|
||||||
|
this.drawer = true;
|
||||||
|
this.buttonDataIF = false;
|
||||||
|
this.topicData = { ...data.row };
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updTopic() {
|
||||||
|
let that = this;
|
||||||
|
this.axios
|
||||||
|
.post("/hysc/library/updTopic", this.topicData)
|
||||||
|
.then(function () {
|
||||||
|
that.getProject();
|
||||||
|
that.drawer = false;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消选题
|
||||||
|
cancelTopic() {
|
||||||
|
let param = new URLSearchParams();
|
||||||
|
param.append("libraryType", this.TopicPageData.libraryType);
|
||||||
|
param.append("projectId", this.projectData.id);
|
||||||
|
let that = this;
|
||||||
|
this.axios
|
||||||
|
.get("/hysc/library/cancelRandomTopic", {
|
||||||
|
params: param,
|
||||||
|
})
|
||||||
|
.then(function () {
|
||||||
|
// that.libraryType1CountData={...response.data.data}
|
||||||
|
that.getProject();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 随机选题
|
||||||
|
randomlyTopic() {
|
||||||
|
let param = new URLSearchParams();
|
||||||
|
param.append("libraryType", this.TopicPageData.libraryType);
|
||||||
|
param.append("projectId", this.projectData.id);
|
||||||
|
let that = this;
|
||||||
|
this.axios
|
||||||
|
.get("/hysc/library/randomTopic", {
|
||||||
|
params: param,
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
that.libraryType1CountData = { ...response.data.data };
|
||||||
|
that.getProject();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 新增题目
|
||||||
addprojectTopic() {
|
addprojectTopic() {
|
||||||
console.log(123);
|
if (this.topicType == 1 || this.topicType == 3) {
|
||||||
|
for (let index = 0; index < this.topicData.options.length; index++) {
|
||||||
|
for (
|
||||||
|
let key = index + 1;
|
||||||
|
key < this.topicData.options.length;
|
||||||
|
key++
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
this.topicData.options[index].topicType ==
|
||||||
|
this.topicData.options[key].topicType
|
||||||
|
) {
|
||||||
|
this.$alert("选项类型不能相同请重新添加", "类型错误", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.axios
|
this.axios
|
||||||
.post("/hysc/library/addTopic", this.topicData)
|
.post("/hysc/library/addTopic", this.topicData)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
@ -420,7 +743,7 @@ export default {
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.data);
|
console.log(response.data.data);
|
||||||
that.selectClassData = response.data.data;
|
that.selectClassData = { ...response.data.data };
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -445,7 +768,7 @@ export default {
|
||||||
params: param,
|
params: param,
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.data);
|
console.log(response.data.data, "123");
|
||||||
that.selectClassData = response.data.data;
|
that.selectClassData = response.data.data;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
@ -453,20 +776,25 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
getProject() {
|
getProject(input) {
|
||||||
let param = new URLSearchParams();
|
let param = new URLSearchParams();
|
||||||
// let that = this;
|
let that = this;
|
||||||
|
if (input) {
|
||||||
|
param.append("topic", input);
|
||||||
|
}
|
||||||
param.append("current", this.TopicPageData.current);
|
param.append("current", this.TopicPageData.current);
|
||||||
param.append("libraryType", this.TopicPageData.libraryType);
|
param.append("libraryType", this.TopicPageData.libraryType);
|
||||||
param.append("size", this.TopicPageData.size);
|
param.append("size", this.TopicPageData.size);
|
||||||
|
param.append("projectId", this.projectData.id);
|
||||||
|
|
||||||
this.axios
|
this.axios
|
||||||
.get("/hysc/library/getTopicPage", {
|
.get("/hysc/library/getTopicPage", {
|
||||||
params: param,
|
params: param,
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data.data);
|
console.log(response.data.data);
|
||||||
// that.selectClassData = response.data.data;
|
that.tableData = response.data.data.records;
|
||||||
|
that.total = response.data.data.total;
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -612,8 +940,13 @@ export default {
|
||||||
.projectTopicAButton > .projectTopicAButtonSearch {
|
.projectTopicAButton > .projectTopicAButtonSearch {
|
||||||
margin-right: 60px;
|
margin-right: 60px;
|
||||||
}
|
}
|
||||||
|
.projectTopicAButtonSearch {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.projectTopicAButtonSearch button {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
.elementUldrawer > div > .tit {
|
.elementUldrawer > div > .tit {
|
||||||
width: 150px;
|
|
||||||
height: 19px;
|
height: 19px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
@ -640,4 +973,45 @@ export default {
|
||||||
border-bottom: 2px solid #0544a4;
|
border-bottom: 2px solid #0544a4;
|
||||||
color: #0544a4;
|
color: #0544a4;
|
||||||
}
|
}
|
||||||
|
.score {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.score .tit {
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #515151;
|
||||||
|
width: 30%;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.nameProject {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.nameProject > :nth-child(2) {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000;
|
||||||
|
margin-top: 36px;
|
||||||
|
margin-bottom: 11px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.imgFm {
|
||||||
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.imgFm input {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.imgFm img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue