大赛赛组管理页面

sale
tianea 3 years ago
parent 6ab618d9aa
commit 9cf8f479bc

Binary file not shown.

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645681730616" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4421" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M495.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L536.082 512l-40.106-35.805zM864 212.083v-82.217a8 8 0 0 0-13.328-5.967L442.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 864 894.134v-82.217a16 16 0 0 0-5.344-11.936L536.082 512l322.574-287.981A16 16 0 0 0 864 212.083zM495.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L536.082 512l-40.106-35.805zM864 212.083v-82.217a8 8 0 0 0-13.328-5.967L442.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 864 894.134v-82.217a16 16 0 0 0-5.344-11.936L536.082 512l322.574-287.981A16 16 0 0 0 864 212.083z" fill="#5090F1" p-id="4422"></path><path d="M223.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L264.082 512l-40.106-35.805zM592 212.083v-82.217a8 8 0 0 0-13.328-5.967L170.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 592 894.134v-82.217a16 16 0 0 0-5.344-11.936L264.082 512l322.574-287.981A16 16 0 0 0 592 212.083zM223.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L264.082 512l-40.106-35.805zM592 212.083v-82.217a8 8 0 0 0-13.328-5.967L170.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 592 894.134v-82.217a16 16 0 0 0-5.344-11.936L264.082 512l322.574-287.981A16 16 0 0 0 592 212.083z" fill="#5090F1" p-id="4423"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645681742518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5882" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M160.117 212.026v-82.233a8 8 0 0 1 13.33-5.966l407.697 364.298c0.9 0.804 1.753 1.658 2.556 2.558 11.764 13.186 10.62 33.419-2.556 45.192L173.448 900.173a8 8 0 0 1-13.33-5.966v-82.233a16 16 0 0 1 5.338-11.93L487.814 512 165.456 223.957a16 16 0 0 1-5.339-11.931z m272.057 0v-82.233a8 8 0 0 1 13.33-5.966l407.697 364.298c0.9 0.804 1.753 1.658 2.556 2.558 11.764 13.186 10.62 33.419-2.556 45.192L445.505 900.173a8 8 0 0 1-13.33-5.966v-82.233a16 16 0 0 1 5.339-11.93L759.87 512 437.514 223.957a16 16 0 0 1-5.34-11.931z" fill="#5090F1" p-id="5883"></path></svg>

After

Width:  |  Height:  |  Size: 932 B

@ -0,0 +1,47 @@
import request from '@/utils/request'
let baseUrl = '/pc/competition/'
export function getList(query) {
return request({
url: baseUrl+'list',
method: 'post',
data: query
})
}
export function add(cat) {
return request({
url: baseUrl+"add",
method: 'post',
data: cat
})
}
export function addSurvey(data){
return request({
url: baseUrl+ 'addSurvey',
method: 'post',
data: data
})
}
export function update(cat) {
return request({
url: baseUrl+"update",
method: 'post',
data: cat
})
}
export function del(cat) {
return request({
url: baseUrl+"delete",
method: 'post',
data: cat
})
}
export function get(cat) {
return request({
url: baseUrl+"get",
method: 'post',
data: cat
})
}

@ -0,0 +1,47 @@
import request from '@/utils/request'
let baseUrl = '/pc/competition/group/'
export function getList(query) {
return request({
url: baseUrl+'list',
method: 'post',
data: query
})
}
export function add(cat) {
return request({
url: baseUrl+"add",
method: 'post',
data: cat
})
}
export function addSurvey(data){
return request({
url: baseUrl+ 'addSurvey',
method: 'post',
data: data
})
}
export function update(cat) {
return request({
url: baseUrl+"update",
method: 'post',
data: cat
})
}
export function del(cat) {
return request({
url: baseUrl+"delete",
method: 'post',
data: cat
})
}
export function get(cat) {
return request({
url: baseUrl+"get",
method: 'post',
data: cat
})
}

@ -0,0 +1,46 @@
import request from '@/utils/request'
let baseUrl = '/pc/multiquestion/'
export function getList(query) {
return request({
url: baseUrl+'list',
method: 'post',
data: query
})
}
export function add(cat) {
return request({
url: baseUrl+"add",
method: 'post',
data: cat
})
}
export function update(cat) {
return request({
url: baseUrl+"update",
method: 'post',
data: cat
})
}
export function del(cat) {
return request({
url: baseUrl+"delete",
method: 'post',
data: cat
})
}
export function get(cat) {
return request({
url: baseUrl+"get",
method: 'post',
data: cat
})
}
export function batch(data){
return request({
url: baseUrl+"batchupdate",
method: 'post',
data: data
})
}

@ -0,0 +1,45 @@
import request from '@/utils/request'
let baseUrl = '/pc/system/province/'
export function getList() {
return request({
url: baseUrl+'list',
method: 'get'
})
}
export function add(cat) {
return request({
url: baseUrl+"add",
method: 'post',
data: cat
})
}
export function update(cat) {
return request({
url: baseUrl+"update",
method: 'post',
data: cat
})
}
export function del(cat) {
return request({
url: baseUrl+"delete",
method: 'post',
data: cat
})
}
export function get(cat) {
return request({
url: baseUrl+"get",
method: 'post',
data: cat
})
}
export function batch(data){
return request({
url: baseUrl+"batchupdate",
method: 'post',
data: data
})
}

@ -73,7 +73,7 @@ export default {
.board-column-content {
height: auto;
overflow: hidden;
overflow: scroll;
border: 10px solid transparent;
min-height: 60px;
display: flex;
@ -83,6 +83,7 @@ export default {
.board-item {
cursor: pointer;
overflow: scroll;
width: 100%;
height: 64px;
margin: 5px 0;

Binary file not shown.

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645503112359" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2201" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M356.7 111.8h425.2c11 0 20 9 20 20v650.3H220.8V247.7" fill="#FFFFFF" p-id="2202"></path><path d="M801.9 798.1H220.8c-8.8 0-16-7.2-16-16V247.7c0-8.8 7.2-16 16-16s16 7.2 16 16v518.4h549.1V131.8c0-2.2-1.8-4-4-4H356.7c-8.8 0-16-7.2-16-16s7.2-16 16-16h425.2c19.9 0 36 16.1 36 36v650.3c0 8.8-7.2 16-16 16z" fill="#00365B" p-id="2203"></path><path d="M220.8 247.7h135.9V111.8z" fill="#7E4AFF" p-id="2204"></path><path d="M356.7 263.7H220.8c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l135.9-135.9c4.6-4.6 11.5-5.9 17.4-3.5 6 2.5 9.9 8.3 9.9 14.8v135.9c0 8.8-7.2 16-16 16z m-97.3-32h81.2v-81.2l-81.2 81.2zM712.5 373.1H353.3c-8.8 0-16-7.2-16-16s7.2-16 16-16h359.2c8.8 0 16 7.2 16 16s-7.2 16-16 16zM559.2 525.6h-206c-8.8 0-16-7.2-16-16s7.2-16 16-16h206c8.8 0 16 7.2 16 16 0 8.9-7.1 16-16 16z" fill="#00365B" p-id="2205"></path><path d="M705 602.3v51.9c0 22.1-17.9 40-40 40H361c-22.1 0-40-17.9-40-40v-51.9H113v309.5h800V602.3H705z" fill="#7E4AFF" p-id="2206"></path><path d="M913 927.8H113c-8.8 0-16-7.2-16-16V602.3c0-8.8 7.2-16 16-16h208c8.8 0 16 7.2 16 16v51.9c0 13.2 10.8 24 24 24h304c13.2 0 24-10.8 24-24v-51.9c0-8.8 7.2-16 16-16h208c8.8 0 16 7.2 16 16v309.5c0 8.8-7.2 16-16 16z m-784-32h768V618.3H721v35.9c0 30.9-25.1 56-56 56H361c-30.9 0-56-25.1-56-56v-35.9H129v277.5z" fill="#00365B" p-id="2207"></path><path d="M606.2 818H419.8c-8.8 0-16-7.2-16-16s7.2-16 16-16h186.3c8.8 0 16 7.2 16 16 0.1 8.9-7.1 16-15.9 16z" fill="#FFFFFF" p-id="2208"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645503521689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3460" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M744.2432 919.1936H327.7312c-90.2656 0-163.3792-73.1648-163.3792-163.3792v-424.448c0-90.2656 73.1648-163.3792 163.3792-163.3792h416.512c90.2656 0 163.3792 73.1648 163.3792 163.3792v424.448c0 90.2144-73.1648 163.3792-163.3792 163.3792z" fill="#9bc6fc" p-id="3461"></path><path d="M683.4176 794.1632h-328.704c-19.8144 0-35.84-16.0256-35.84-35.84s16.0256-35.84 35.84-35.84h328.704c19.8144 0 35.84 16.0256 35.84 35.84s-16.0256 35.84-35.84 35.84zM550.7072 297.216l44.3392 89.8048a21.72928 21.72928 0 0 0 16.384 11.8784l99.1232 14.3872c17.8176 2.6112 24.9344 24.5248 12.032 37.0688l-71.7312 69.888c-5.12 5.0176-7.4752 12.1856-6.2464 19.2512l16.9472 98.7136c3.072 17.7664-15.616 31.3344-31.5392 22.9376l-88.6272-46.592a21.72928 21.72928 0 0 0-20.224 0l-88.6272 46.592c-15.9744 8.3968-34.6112-5.1712-31.5392-22.9376l16.9472-98.7136c1.2288-7.0656-1.1264-14.2336-6.2464-19.2512L339.8656 450.4064c-12.9024-12.5952-5.7856-34.5088 12.032-37.0688l99.1232-14.3872a21.8112 21.8112 0 0 0 16.384-11.8784l44.3392-89.8048c7.936-16.2304 30.976-16.2304 38.9632-0.0512z" fill="#FEC963" p-id="3462"></path><path d="M673.1776 725.0432h-328.704c-12.7488 0-23.04 10.2912-23.04 23.04s10.2912 23.04 23.04 23.04h328.704c12.7488 0 23.04-10.2912 23.04-23.04s-10.2912-23.04-23.04-23.04zM698.0608 381.44l-118.0672-17.152-52.7872-106.9568c-3.8912-7.8848-11.8784-12.8512-20.6848-12.8512s-16.7936 4.9664-20.6848 12.8512L433.152 364.288 315.0848 381.44c-8.704 1.28-15.872 7.3216-18.5856 15.6672a22.95808 22.95808 0 0 0 5.8368 23.6032l85.4016 83.2512-20.1728 117.5552a22.9888 22.9888 0 0 0 9.1648 22.528 22.98368 22.98368 0 0 0 24.2688 1.7408l105.5744-55.5008 105.5744 55.5008c3.3792 1.792 7.0656 2.6624 10.7008 2.6624 4.7616 0 9.5232-1.4848 13.568-4.4032a22.9888 22.9888 0 0 0 9.1648-22.528l-20.1728-117.5552 85.4016-83.2512a22.98368 22.98368 0 0 0 5.8368-23.6032 22.85056 22.85056 0 0 0-18.5856-15.6672z m-113.4592 97.9968a22.9888 22.9888 0 0 0-6.6048 20.3776l14.336 83.5072-75.008-39.424c-3.3792-1.7408-7.0144-2.6624-10.7008-2.6624-3.6864 0-7.3728 0.8704-10.7008 2.6624l-75.008 39.424L435.2 499.8144a22.9888 22.9888 0 0 0-6.6048-20.3776L367.9232 420.3008l83.8144-12.1856a22.9888 22.9888 0 0 0 17.3568-12.5952l37.4784-75.9808 37.4784 75.9808a22.9888 22.9888 0 0 0 17.3568 12.5952l83.8144 12.1856-60.6208 59.136z" fill="#474747" p-id="3463"></path><path d="M729.344 87.2448H281.5488c-111.0016 0-201.3184 90.3168-201.3184 201.3184v452.3008c0 111.0016 90.3168 201.3184 201.3184 201.3184h447.7952c111.0016 0 201.3184-90.3168 201.3184-201.3184V288.6144c0-111.0528-90.3168-201.3696-201.3184-201.3696z m155.2384 653.6704c0 85.6064-69.632 155.2384-155.2384 155.2384H281.5488c-85.6064 0-155.2384-69.632-155.2384-155.2384V288.6144c0-85.6064 69.632-155.2384 155.2384-155.2384h447.7952c85.6064 0 155.2384 69.632 155.2384 155.2384v452.3008z" fill="#474747" p-id="3464"></path></svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645503305684" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2460" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M319.146667 790.186667l5.12 1.706666-5.12 1.706667c-32.426667 8.533333-56.32 34.133333-64.853334 68.266667l-1.706666 5.12-1.706667-5.12c-8.533333-34.133333-32.426667-59.733333-64.853333-68.266667l-5.12-1.706667 5.12-1.706666c32.426667-8.533333 56.32-34.133333 64.853333-68.266667l1.706667-5.12 1.706666 5.12c8.533333 32.426667 34.133333 59.733333 64.853334 68.266667z" fill="#FFBE1B" p-id="2461"></path><path d="M418.133333 223.573333l6.826667 1.706667-6.826667 1.706667c-35.84 10.24-63.146667 39.253333-71.68 76.8l-1.706666 6.826666-1.706667-6.826666c-8.533333-37.546667-35.84-68.266667-71.68-76.8l-6.826667-1.706667 6.826667-1.706667c35.84-10.24 63.146667-39.253333 71.68-76.8l1.706667-6.826666 1.706666 6.826666c8.533333 37.546667 35.84 68.266667 71.68 76.8zM267.946667 349.866667l3.413333 1.706666-3.413333 1.706667c-23.893333 6.826667-42.666667 25.6-47.786667 51.2l-1.706667 5.12-1.706666-5.12c-5.12-25.6-23.893333-46.08-47.786667-51.2l-3.413333-1.706667 3.413333-1.706666c23.893333-6.826667 42.666667-25.6 47.786667-51.2l1.706666-5.12 1.706667 5.12c5.12 25.6 23.893333 44.373333 47.786667 51.2z" fill="#2371F5" p-id="2462"></path><path d="M853.333333 628.053333l3.413334 1.706667H853.333333c-23.893333 6.826667-44.373333 27.306667-49.493333 52.906667l-1.706667 5.12v-3.413334c-6.826667-25.6-25.6-46.08-49.493333-52.906666l-3.413333-1.706667 3.413333-1.706667c23.893333-6.826667 44.373333-27.306667 49.493333-52.906666l1.706667-5.12 1.706667 5.12c5.12 25.6 23.893333 46.08 47.786666 52.906666z" fill="#5D8EF9" p-id="2463"></path><path d="M363.52 390.826667h-27.306667c-15.36 0-27.306667 11.946667-27.306666 27.306666v310.613334c0 15.36 11.946667 27.306667 27.306666 27.306666h281.6c15.36 0 27.306667-11.946667 27.306667-27.306666v-27.306667H392.533333c-15.36 0-27.306667-11.946667-27.306666-27.306667V390.826667z m0 0" fill="#5D8EF9" p-id="2464"></path><path d="M703.146667 307.2H419.84c-15.36 0-27.306667 11.946667-27.306667 27.306667v310.613333c0 15.36 11.946667 27.306667 27.306667 27.306667h281.6c15.36 0 27.306667-11.946667 27.306667-27.306667V334.506667c1.706667-15.36-10.24-27.306667-25.6-27.306667z m-254.293334 97.28h225.28c8.533333 0 13.653333 6.826667 13.653334 13.653333 0 8.533333-6.826667 13.653333-13.653334 13.653334H448.853333c-8.533333 0-13.653333-6.826667-13.653333-13.653334-1.706667-6.826667 5.12-13.653333 13.653333-13.653333z m83.626667 197.973333h-85.333333c-8.533333 0-13.653333-6.826667-13.653334-13.653333s6.826667-13.653333 13.653334-13.653333h85.333333c8.533333 0 13.653333 6.826667 13.653333 13.653333 1.706667 6.826667-5.12 13.653333-13.653333 13.653333z m58.026667-83.626666h-141.653334c-8.533333 0-13.653333-6.826667-13.653333-13.653334 0-8.533333 6.826667-13.653333 13.653333-13.653333h141.653334c8.533333 0 13.653333 6.826667 13.653333 13.653333s-6.826667 13.653333-13.653333 13.653334z m69.973333 97.28c-23.893333 0-42.666667-18.773333-42.666667-42.666667s18.773333-42.666667 42.666667-42.666667 42.666667 18.773333 42.666667 42.666667-18.773333 42.666667-42.666667 42.666667z m0 0" fill="#2371F5" p-id="2465"></path></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645681730616" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4421" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M495.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L536.082 512l-40.106-35.805zM864 212.083v-82.217a8 8 0 0 0-13.328-5.967L442.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 864 894.134v-82.217a16 16 0 0 0-5.344-11.936L536.082 512l322.574-287.981A16 16 0 0 0 864 212.083zM495.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L536.082 512l-40.106-35.805zM864 212.083v-82.217a8 8 0 0 0-13.328-5.967L442.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 864 894.134v-82.217a16 16 0 0 0-5.344-11.936L536.082 512l322.574-287.981A16 16 0 0 0 864 212.083z" fill="#5090F1" p-id="4422"></path><path d="M223.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L264.082 512l-40.106-35.805zM592 212.083v-82.217a8 8 0 0 0-13.328-5.967L170.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 592 894.134v-82.217a16 16 0 0 0-5.344-11.936L264.082 512l322.574-287.981A16 16 0 0 0 592 212.083zM223.976 476.195c19.777 17.656 21.494 48 3.837 67.774a48.003 48.003 0 0 1-3.837 3.836L264.082 512l-40.106-35.805zM592 212.083v-82.217a8 8 0 0 0-13.328-5.967L170.69 488.13c-0.9 0.804-1.754 1.657-2.558 2.557-11.772 13.184-10.626 33.412 2.558 45.183l407.983 364.231A8 8 0 0 0 592 894.134v-82.217a16 16 0 0 0-5.344-11.936L264.082 512l322.574-287.981A16 16 0 0 0 592 212.083z" fill="#5090F1" p-id="4423"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645681742518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5882" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M160.117 212.026v-82.233a8 8 0 0 1 13.33-5.966l407.697 364.298c0.9 0.804 1.753 1.658 2.556 2.558 11.764 13.186 10.62 33.419-2.556 45.192L173.448 900.173a8 8 0 0 1-13.33-5.966v-82.233a16 16 0 0 1 5.338-11.93L487.814 512 165.456 223.957a16 16 0 0 1-5.339-11.931z m272.057 0v-82.233a8 8 0 0 1 13.33-5.966l407.697 364.298c0.9 0.804 1.753 1.658 2.556 2.558 11.764 13.186 10.62 33.419-2.556 45.192L445.505 900.173a8 8 0 0 1-13.33-5.966v-82.233a16 16 0 0 1 5.339-11.93L759.87 512 437.514 223.957a16 16 0 0 1-5.34-11.931z" fill="#5090F1" p-id="5883"></path></svg>

After

Width:  |  Height:  |  Size: 932 B

@ -98,6 +98,11 @@ export const constantRoutes = [
name: 'create',
component: () => import('@/views/competition/create'),
meta: { title: '新建大赛', icon: 'dasai' }
},
{
path: 'edit',
name: 'Edit',
component: () => import('@/views/competition/create')
}
]
},
@ -175,6 +180,31 @@ export const constantRoutes = [
meta: {title: '批量导入', icon: 'batch_add'}
}
]
},
{
path: 'anli',
component: () => import('@/views/resource/anli/index'),
name: 'anli',
meta: { title: '案例题管理', icon :'anli'},
children: [
{
path: 'list',
name: "List",
component: () => import('@/views/resource/anli/anliList'),
meta: { title: '案例题列表', icon: 'anli_list'}
},
{
path: 'add',
name: 'Add',
component: () => import('@/views/resource/anli/add/anli'),
meta: { title: '新增竞赛案例', icon: 'anli_add'}
},
{
path: 'edit',
name: 'Edit',
component: () => import('@/views/resource/anli/add/edit')
}
]
}
]
},

@ -0,0 +1,32 @@
<template>
<editor
api-key="wuyv0zkbaek2eni7uc4cj2q099vfhbibrj3cv5yjymq41bod"
initialValue=""
v-model="temp.content"
:init="{
height: 500,
menubar: false,
language:'zh_CN',
images_upload_url: '/api/upload/image/upload',
plugins: [
'advlist autolink lists link image charmap',
'searchreplace visualblocks code fullscreen',
'print preview anchor insertdatetime media',
'paste code help wordcount table'
],
toolbar:
'undo redo | formatselect | bold italic | \
alignleft aligncenter alignright | \
bullist numlist outdent indent | image | help'
}"
>
</editor>
</template>
<script>
import Editor from '@tinymce/tinymce-vue'
import Edit from '../../resource/exam/add/edit.vue'
export default {
components:{ 'editor':EditorEdit}
}
</script>

@ -18,7 +18,7 @@
</el-table-column>
<el-table-column label="包括类别">
<template slot-scope="scope">
{{ scope.row.content }}
<span class="tz-span" v-for="item in scope.row.catList" :key="item.id">{{ item.name }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300" class-name="small-padding fixed-width">
@ -33,26 +33,35 @@
</el-table-column>
</el-table>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px">
<el-form-item label="赛组名" prop="type">
<el-input placeholder="请输入赛组名" />
<div class="tz-line">
<el-input v-model="groupName" placeholder="请输入赛组名" /><el-button>查询</el-button>
</div>
</el-form-item>
<el-form-item>
<div class="tab">
<div>学校层次</div>
<div>所属省份</div>
<div @click="changeType(2)" >所属省份</div>
<div @click="changeType(1)" >学校层次</div>
</div>
</el-form-item>
<el-form-item>
<div class="tbpanel">
<Kanban :key="1" :list="regionOptions" :group="dgroup" class="kanban todo" header-text="" />
<Kanban :key="2" :list="levelOtions" :group="dgroup" class="kanban working" header-text="" />
<Kanban :key="3" :list="list" :group="dgroup" class="kanban done" header-text="" />
<ul class="list-box" @keydown="shiftDown" @click="tboxClick" @keyup="shiftUp" data-id="1">
<li v-for="(item,$index) in oneOptions" :key="item.id" :tabindex="$index" class="" :data-id="item.id" > {{item.name}} </li>
</ul>
<div class="tbbpanel">
<div @click="removeLi"></div>
<div @click="addLi"></div>
</div>
<ul class="list-box" data-id="2" @keydown="shiftDown" @click="tboxClick" @keyup="shiftUp" >
<li v-for="(item, $index ) in twoOptions" :key="item.id" :tabindex="$index" :data-id="item.id"> {{item.name}} </li>
</ul>
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary">
<el-button type="primary" @click="addGroup" >
确认
</el-button>
<el-button @click="dialogFormVisible = false">
@ -64,13 +73,12 @@
</template>
<script>
import { getList } from '@/api/table'
import Kanban from '@/components/Kanban'
import * as province from '@/api/province'
import * as level from '@/api/level'
export default {
name: 'Group',
components: {
Kanban
},
filters: {
statusFilter(status) {
@ -84,14 +92,21 @@ export default {
},
props: {
group: {
type: Object,
default: function() { return {} }
type: Array,
default: []
},
cmpId: {
type: Number,
default: 0
}
},
data() {
return {
minIndex: 0,
maxIndex: 0,
setAttr: false,
list: null,
listLoading: true,
listLoading: false,
listQuery: {
pageNo: 0
},
@ -102,40 +117,24 @@ export default {
update: 'Edit',
create: 'Create'
},
groupName: '',
groupType: 2,
dialogFormVisible: false,
provincOtions: [{
id: 1,
name: '北京'
},{
id: 2,
name: '上海'
},{
id: 3,
name: '深圳'
}],
regionOptions: [{
id: 1,
name: '东南地区'
}],
levelOtions: [{
id: 1,
name: '本科'
}],
provincOptions: [],
levelOptions: [],
selectOptions: [],
oneOptions: [],
twoOptions: [],
dialogStatus: '',
statusOptions: ['published', 'draft', 'deleted'],
temp: {
id: undefined,
importance: 1,
remark: '',
timestamp: new Date(),
title: '',
type: '',
status: 'published'
competitionId: 0,
name: '',
limitType: 1,
catList: []
},
rules: {
type: [{ required: true, message: 'type is required', trigger: 'change' }],
timestamp: [{ type: 'date', required: true, message: 'timestamp is required', trigger: 'change' }],
title: [{ required: true, message: 'title is required', trigger: 'blur' }]
}
}
},
@ -145,24 +144,136 @@ export default {
methods: {
fetchData() {
this.listLoading = true
getList(this.listQuery).then(response => {
const userPage = response.data.userPage
this.list = userPage.content
this.total = userPage.totalElements
province.getList().then(response => {
this.provincOptions = response.data.list
this.listLoading = false
})
level.getList().then(res=>{
if(res.code == 200){
this.levelOptions = res.data.list
}
})
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.groupType = this.temp.limitType;
if(this.groupType == 1){
this.oneOptions = this.provincOptions
}else{
this.oneOptions = this.levelOptions
}
this.twoOptions = this.temp.catList
this.dialogFormVisible = true
},
add() {
this.dialogFormVisible = true
this.oneOptions = Object.assign([], this.provincOptions)
this.twoOptions = []
this.groupName = ''
},
shiftDown(event){
if(event.key == 'Shift'){
this.maxIndex = event.target.attributes['tabindex'].value
this.setAttr= true
}
},
shiftUp(event){
if(event.key == 'Shift'){
this.setAttr= false
this.maxIndex = -1
}
},
handleDelete(row,index){
this.group.splice(index,1)
},
tboxClick(event){
let current = event.target
if(!current.parentElement.attributes["data-id"]) return
let parentId = parseInt(current.parentElement.attributes["data-id"].value) -1
let tempIndex = current.attributes['tabindex'].value
if(this.setAttr==false){
let eles = document.getElementsByClassName("list-box")
eles[parentId].childNodes.forEach(child =>{
let t = child.attributes['class']
if(t){
t.value=''
}
})
}
if(current.attributes['class']){
current.attributes['class'].value = 'li-selected'
}else{
var att=document.createAttribute("class");
att.value="li-selected";
current.attributes.setNamedItem(att)
}
if(tempIndex!=this.maxIndex){
if(tempIndex>this.maxIndex){
this.minIndex = this.maxIndex
this.maxIndex = tempIndex
}else{
this.minIndex = tempIndex
}
let eles = document.getElementsByClassName("list-box")
eles[parentId].childNodes.forEach(child =>{
const i = parseInt(child.attributes['tabindex'].value)
if(i>=this.minIndex&&i<=this.maxIndex){
if(this.setAttr){
if(child.attributes['class']){
child.attributes['class'].value = 'li-selected';
}else{
var att=document.createAttribute("class");
att.value="li-selected";
child.attributes.setNamedItem(att)
}
}
}
})
}
},
removeLi(){
let eles = document.getElementsByClassName("list-box")
eles[1].childNodes.forEach(child =>{
let c = child.attributes['class']
if(c&&c.value=="li-selected"){
let id = child.attributes["data-id"].value
let tmps = this.twoOptions.find(p=> p.id == parseInt(id))
let index = this.twoOptions.indexOf(tmps)
this.oneOptions.push(tmps)
this.twoOptions.splice(index,1)
}
})
},
addLi(){
let eles = document.getElementsByClassName("list-box")
eles[0].childNodes.forEach(child =>{
let c = child.attributes['class']
if(c&&c.value=="li-selected"){
let id = child.attributes["data-id"].value
let tmps = this.oneOptions.find(p=> p.id == parseInt(id))
let index = this.oneOptions.indexOf(tmps)
this.twoOptions.push(tmps)
this.oneOptions.splice(index,1)
}
})
},
changeType(type){
this.groupType = type
if(type === 1){
this.oneOptions = Object.assign([], this.levelOptions)
}else{
this.oneOptions = Object.assign([],this.provincOptions)
}
this.twoOptions = []
},
addGroup(){
this.temp.limitType = this.groupType
this.temp.catList = this.twoOptions
this.temp.name = this.groupName
this.temp.competitionId = this.cmpId
let tmp = Object.assign({},this.temp)
this.group.push(tmp)
this.dialogFormVisible = false
}
}
}
@ -214,4 +325,46 @@ export default {
.done .board-column-header {
background: #2ac06d;
}
.list-box{
overflow: scroll;
height: 250px;
padding-left: 3px;
border: 1px solid gray;
min-width: 200px;
}
.list-box>li {
list-style-type: none;
height:40px;
}
.list-box>li::selection {
background-color: none;
}
.li-selected {
outline-style: none;
background: #4A9FF9;
color: white;
}
.tbbpanel{
display: flex;
align-items: center;
}
.tbbpanel div:nth-child(1){
height: 25px;
width: 25px;
background: url('/svg/left.svg');
background-size: cover;
}
.tbbpanel div:nth-child(2){
height: 25px;
width: 25px;
background: url('/svg/right_arrow.svg');
background-size: cover;
}
.hidden{
display: none;
}
.tz-span{
margin-left: 10px;
}
</style>

@ -6,46 +6,47 @@
</el-form-item>
<el-form-item label="大赛模式" prop="type">
<el-select v-model="survey.type" class="filter-item" placeholder="请选择">
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.name" />
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="主办方名称" prop="sponser">
<el-input v-model="survey.sponser" />
<el-input v-model="survey.sponsor" />
</el-form-item>
<el-form-item label="团队人数范围">
<el-input-number v-model="survey.minPeopleNumber" />
<el-input-number v-model="survey.maxPeopelNumber" />
<el-input-number v-model="survey.teamMinCount" />
<el-input-number v-model="survey.teamMaxCount" />
</el-form-item>
<el-form-item class="form-item-line" label="技术支持方">
<el-input v-model="survey.supporter" style="width: 33%;" />
</el-form-item>
<el-form-item v-for="item in survey.stage" :key="item.name" :label="item.name" class="form-item-line">
<el-form-item v-for="(item ,$index) in survey.stageList" :key="item.name" :label="item.name" class="form-item-line">
<el-date-picker v-model="item.startTime" type="datetime" placeholder="请选择开始时间" />
<el-date-picker v-model="item.endTime" type="datetime" placeholder="请选择结束时间" />
<el-button type="danger">删除</el-button>
<el-button type="danger" @click="deleteStage(item.id,$index)" >删除</el-button>
</el-form-item>
<el-form-item class="form-item-line">
<el-input style="width: 20%; margin-right: 20px;" placeholder="赛段名称" />
<el-date-picker type="datetime" placeholder="请选择开始时间" /><el-date-picker type="datetime" placeholder="请选择结束时间" />
<el-button type="primary">添加</el-button>
</el-form-item>
<el-form-item class="form-item-line" label="大赛轮播图">
<upload-image />
<el-input v-model="stageTemp.name" style="width: 20%; margin-right: 20px;" placeholder="赛段名称" />
<el-date-picker v-model="stageTemp.startTime" type="datetime" placeholder="请选择开始时间" /><el-date-picker v-model="stageTemp.endTime" type="datetime" placeholder="请选择结束时间" />
<el-button type="primary" @click="addStage"></el-button>
</el-form-item>
<el-form-item class="form-item-line" label="大赛缩略图">
<upload-image />
<upload-image :url.sync="survey.thumbnail" />
</el-form-item>
<el-form-item>
<el-button type="primary">保存</el-button>
<el-button>下一步</el-button>
<el-form-item class="form-item-line" label="大赛轮播图">
<el-input v-model="tempBanner.link" placeholder="链接地址" />
<upload-image :url.sync="tempBanner.img" />
<el-button @click="addBanner" type="primary">添加</el-button>
</el-form-item>
<el-form-item v-for="(item,$index) in survey.bannerList" :label="'轮播'+($index+1)" :key="$index" class="form-item-line" >
<el-popover trigger="hover"><el-image fit="fit" :src="item.img" />{{ item.link}}<el-button slot="reference">查看</el-button></el-popover> <el-button type="danger" @click="deleteBanner($index)" ></el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { getList } from '@/api/table'
import uploadImage from '../../../components/Upload/SingleImage.vue'
import uploadImage from '../../../components/Upload/SingleImage2.vue'
export default {
components: {
'upload-image': uploadImage
@ -69,6 +70,17 @@ export default {
data() {
return {
list: null,
stageTemp:{
id: 0,
name: '',
startTime: '',
endTime: ''
},
tempBanner:{
link: '',
img: ''
},
bannerList: [],
typeOptions: [{
name: '团队赛',
id: 1
@ -102,13 +114,15 @@ export default {
dialogStatus: '',
statusOptions: ['published', 'draft', 'deleted'],
temp: {
studentNo: undefined,
importance: 1,
remark: '',
timestamp: new Date(),
title: '',
type: '',
status: 'published'
name: '',
type: 0,
sponsor: '',
supporter: '',
teamMinCount: 1,
teamMaxCount: 10,
stageList: [
]
},
rules: {
studentNo: [{ required: true, message: '学号为必填项', trigger: 'blur' }],
@ -123,13 +137,7 @@ export default {
},
methods: {
fetchData() {
this.listLoading = true
getList(this.listQuery).then(response => {
const userPage = response.data.userPage
this.list = userPage.content
this.total = userPage.totalElements
this.listLoading = false
})
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
@ -139,6 +147,70 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
},
addStage(){
console.log(this.stageTemp)
console.log()
if(this.stageTemp.startTime>this.stageTemp.endTime){
this.$notify({
title: '操作失败',
message: "结束时间必须大于开始时间",
type: 'error',
duration: 2000
})
return
}
if(!this.stageTemp.name||this.stageTemp.name.length == 0){
this.$notify({
title: '操作失败',
message: "赛段名不能为空",
type: 'error',
duration: 2000
})
return
}
let newStage = Object.assign({}, this.stageTemp)
let max = this.survey.stageList.length
for(var i = 0;i<this.survey.stageList.length;i++){
if( this.survey.stageList[i].id >max){
max = this.survey.stageList[i].id
}
}
newStage.id = max+1
this.survey.stageList.push(newStage)
},
deleteStage(id,index){
this.survey.stageList.splice(index,1)
},
addBanner(){
if(!this.tempBanner.link||this.tempBanner.link.length<=0){
this.$notify({
title: '操作失败',
message: "轮播链接地址不能为空",
type: 'error',
duration: 2000
})
return
}
if(!this.tempBanner.img||this.tempBanner.img.length<=0){
this.$notify({
title: '操作失败',
message: "轮播图不能为空",
type: 'error',
duration: 2000
})
return
}
let newBanner = Object.assign({}, this.tempBanner)
if(!this.survey.bannerList){
this.survey.bannerList = []
}
this.survey.bannerList.push(newBanner);
this.tempBanner.link = ''
this.tempBanner.img = ''
},
deleteBanner(index){
this.survey.bannerList.splice(index,1)
}
}
}

@ -7,9 +7,12 @@
<div v-for="item in tabList" :key="item.id" :class="tabId == item.id?'select':'normal'" @click="changeTab(item.id)">{{ item.name }}</div>
</div>
<div class="tz-content">
<survey v-if="tabId==0" :survey="competition.survey" />
<group v-if="tabId==1" :group="competition.group" />
<task v-if="tabId==2" :survey="competition.survey" />
<survey v-if="tabId==0" :survey="comp.survey" />
<group v-if="tabId==1" :group="comp.group" :cmpId="competitionId" />
<task v-if="tabId==2" :survey="comp.survey" />
</div>
<div>
<el-button v-if="tabId>0" type="primary" @click="backStep">上一步</el-button> <el-button type="primary" @click="save">保存</el-button> <el-button v-if="tabId<this.tabList.length - 1" type="primary" @click="nextStep"></el-button>
</div>
</div>
</div>
@ -18,57 +21,27 @@
import Survey from './components/survey.vue'
import Group from './components/group.vue'
import Task from './components/task.vue'
import * as competition from '@/api/competition'
import * as cgroup from '@/api/group'
export default {
components: { 'survey': Survey, 'group': Group ,'task': Task },
data() {
return {
test: 'hello',
competition: {
competitionId: 0,
comp: {
survey: {
name: '',
type: '',
type: 1,
sponsor: '',
minPeopleNumber: 0,
maxPeopelNumber: 0,
teamMinCount: 0,
teamMaxCount: 0,
supporter: '',
stage: [{
name: '报名阶段',
startTime: '2022-05-20',
endTime: '2022-06-20',
comprihensive: {
securitiesWeight: 60,
operationWeight: 40,
},
operation: {
startTime: '',
endTime: '',
tradeType: '',
found: 100000,
logo: '',
baseWeight:60,
weight:40
}
}, {
name: '试玩阶段',
startTime: '2022-05-20',
endTime: '2022-06-20'
}, {
name: '竞赛阶段',
startTime: '2022-05-20',
endTime: '2022-06-20'
}],
banner: ['', '']
stageList: [],
bannerList: [],
thumbnail: ''
},
group: [{
name: '本科组',
content: ['本科']
}, {
name: '职教组',
content: ['中职', '高职']
}, {
name: '东部赛区',
content: ['上海', '江苏', '浙江', '山东', '安徽']
}]
group: []
},
tabId: 0,
tabList: [{
@ -106,9 +79,50 @@ export default {
]
}
},
created() {
if(this.$route.query.id){
this.competitionId = this.$route.query.id
competition.get({id: this.$route.query.id}).then(res=>{
if(res.code==200){
this.comp.survey = res.data
}
})
}
},
methods: {
changeTab(val) {
this.tabId = val
},
nextStep(){
if(this.tabId<this.tabList.length-1) {
this.tabId = this.tabId+1;
}
},
backStep(){
if(this.tabId>0){
this.tabId = this.tabId-1;
}
},
save(){
console.log(this.tabId)
if(this.tabId == 0){
competition.add(this.comp.survey).then(res => {
if(res.code == 200) {
this.$notify({
title: '操作成功',
message: "success",
type: 'success',
duration: 2000
})
}
})
}else if(this.tabId == 1){
cgroup.add({"list": this.comp.group}).then(res=>{
if(res.code == 200){
this.comp.group = res.data.list;
}
})
}
}
}
}
@ -128,6 +142,7 @@ export default {
box-shadow: 2px 2px 10px rgb(221, 220, 220);
margin: 5px;
padding: 10px;
border-radius: 5px;
}
.normal {
background-color: rgb(229, 226, 226);

@ -6,7 +6,7 @@
</div>
<el-table
v-loading="listLoading"
:data="competittionList"
:data="list"
element-loading-text="Loading"
border
fit
@ -24,12 +24,12 @@
</el-table-column>
<el-table-column label="当前赛段" align="center">
<template slot-scope="scope">
{{ scope.row.stage }}
{{ scope.row.stageName }}
</template>
</el-table-column>
<el-table-column label="大赛模式" align="center">
<template slot-scope="scope">
<span>{{ scope.row.type }}</span>
<span>{{ scope.row.type==1?'团队赛':'个人赛' }}</span>
</template>
</el-table-column>
<el-table-column label="参赛人数" align="center">
@ -39,7 +39,7 @@
</el-table-column>
<el-table-column label="开始时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.startTime }}</span>
<span>{{ new Date(scope.row.startTime).Format('yyyy-MM-dd hh:mm:ss') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center">
@ -49,7 +49,7 @@
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status }}</span>
<span>{{ statusToName(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300" class-name="small-padding fixed-width">
@ -70,54 +70,11 @@
layout="total,prev,pager,next,jumper,sizes"
:total="total"
/>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
<el-form-item label="序号" prop="type">
<el-input v-model="temp.studentNo" />
</el-form-item>
<el-form-item label="大赛名称" prop="timestamp">
<el-input v-model="temp.name" />
</el-form-item>
<el-form-item label="赛程阶段" prop="title">
<el-input v-model="temp.stage" />
</el-form-item>
<el-form-item label="参赛人数" prop="title">
<el-input v-model="temp.school" />
</el-form-item>
<el-form-item label="大赛模式">
<el-input v-model="temp.mobile" />
</el-form-item>
<el-form-item label="开始时间">
<el-select v-model="temp.pronvice" class="filter-item" placeholder="请选择">
<el-option v-for="item in provincOtions" :key="item.id" :label="item.name" :value="item.key" />
</el-select>
</el-form-item>
<el-form-item label="结束时间">
<el-select v-model="temp.region" class="filter-item" placeholder="请选择">
<el-option v-for="item in regionOptions" :key="item.id" :label="item.name" :value="item.key" />
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="temp.leve" class="filter-item" placeholder="请选择">
<el-option v-for="item in levelOtions" :key="item.id" :label="item.name" :value="item.key" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">
取消
</el-button>
<el-button type="primary">
确认
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getList } from '@/api/table'
import * as competition from '@/api/competition'
export default {
filters: {
statusFilter(status) {
@ -134,7 +91,8 @@ export default {
list: null,
listLoading: true,
listQuery: {
pageNo: 0
pageNo: 0,
pageSize: 20
},
total: 0,
limit: 20,
@ -209,21 +167,30 @@ export default {
methods: {
fetchData() {
this.listLoading = true
getList(this.listQuery).then(response => {
const userPage = response.data.userPage
this.list = userPage.content
this.total = userPage.totalElements
competition.getList(this.listQuery).then(response => {
const onePage = response.data.page
this.list = onePage.content
this.total = onePage.totalElements
this.listLoading = false
})
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
this.$router.push({
path:'/competition/edit',
query: {id: row.id}
})
},
statusToName(status){
switch(status){
case -1:
return "未发布";
case 0:
return "未开始";
case 1:
return "已开始";
case 2:
return "已结束";
}
}
}
}

@ -0,0 +1,354 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-button @click="$router.back()">
取消
</el-button>
<el-button type="primary" @click="addMulti">
确认
</el-button>
</div>
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="100px" style="margin-left:50px;">
<div class="tz-flex">
<el-form-item label="归属课程" prop="name">
<el-select v-model="temp.courseId" class="filter-item" placeholder="请选择">
<el-option v-for="item in courseOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="案例层次">
<el-select v-model="temp.levelId" class="filter-item" placeholder="请选择">
<el-option v-for="item in levelOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</div>
<el-form-item label="案例名称">
<el-input type="textarea" v-model="temp.stem" />
</el-form-item>
<el-form-item label="课程简介">
<editor style="margin-left: 0;"
api-key="wuyv0zkbaek2eni7uc4cj2q099vfhbibrj3cv5yjymq41bod"
initialValue=""
v-model="temp.content"
:init="{
height: 250,
menubar: false,
language:'zh_CN',
images_upload_url: '/api/upload/image/upload',
plugins: [
'advlist autolink lists link image charmap',
'searchreplace visualblocks code fullscreen',
'print preview anchor insertdatetime media',
'paste code help wordcount table'
],
toolbar:
' undo redo | formatselect | bold italic | \
alignleft aligncenter alignright | \
bullist numlist outdent indent | image | help'
}"
>
</editor>
</el-form-item>
<el-form-item>
<el-button @click="dialogFormVisible =true">添加步聚</el-button>
</el-form-item>
<el-form-item>
<el-table :data="childList" >
<el-table-column label="序号" align="center">
<template slot-scope="{$index}">
<span>{{ $index }}</span>
</template>
</el-table-column>
<el-table-column label="小题题干" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stem }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="350" class-name="small-padding fixed-width">
<template slot-scope="{row,$index}">
<el-button type="primary" size="mini" @click="handleUpdate(row)">
编辑
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="handleDelete(row,$index)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<el-dialog title="添加步聚" :visible.sync="dialogFormVisible">
<div class="app-container">
<div class="filter-container">
<el-button @click="dialogFormVisible = false">
取消
</el-button>
<el-button type="primary" @click="add">
确认
</el-button>
</div>
<el-form ref="dataForm" :rules="rules" :model="temp2" label-position="left" label-width="100px" style="margin-left:50px;">
<div class="tz-flex">
<el-form-item label="题型" prop="timestamp">
<el-select @change="typeChange" v-model="temp2.questionType" class="filter-item" placeholder="请选择">
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="分值" prop="timestamp">
<el-input-number v-model="temp2.score" :min="1" />
</el-form-item>
</div>
<el-form-item label="题干">
<el-input type="textarea" v-model="temp2.stem" />
</el-form-item>
<el-form-item label="选项">
<div v-for="item in temp2.answerList" :key="item.id" class="opt">
<div class="line">
<span class="correct" @dblclick="cancel(item)" @click="confirm(item)" :style="item.correct?'background-color:red; color:white':''" >{{ indexToWord(item.id) }}</span> <el-input v-model="item.title" />
</div>
</div>
</el-form-item>
<el-form-item label="答案">
<div style="display:flex">
<span class="correct" style="background-color:red; color:white" v-for="item in temp2.answerId" :key="item">{{ indexToWord(item) }}</span>
</div>
</el-form-item>
<el-form-item label="解析">
<el-input type="textarea" v-model="temp2.analysis" />
</el-form-item>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import * as course from '@/api/course'
import * as level from '@/api/level'
import * as question from '@/api/multiquestion'
import uploadImage from '@/components/Upload/SingleImage2.vue'
import Editor from '@tinymce/tinymce-vue'
export default {
components: {
'upload-image': uploadImage,
'editor': Editor
},
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: null,
listLoading: true,
listQuery: {
pageNo: 0
},
total: 0,
limit: 20,
textMap: {
update: 'Edit',
create: 'Create'
},
checkGroup:{
stem: false
},
dialogFormVisible: false,
courseOptions: [],
levelOptions: [],
typeOptions:[
{
id: 1,
name: '单选'
},
{
id: 2,
name: '多选'
},
{
id: 3,
name: '判断'
}
],
dialogStatus: 'Edit',
statusOptions: ['published', 'draft', 'deleted'],
childList:[],
temp: {
score: 1,
courseId: 1,
courseName: '',
levelId: 1,
levelName: '',
questionType: 1,
stem: '',
stemImg: '',
answerList:[],
answerId: [],
analysis: '',
type: 0
},
temp2: {
score: 1,
courseId: 1,
courseName: '',
levelId: 1,
levelName: '',
questionType: 1,
stem: '',
stemImg: '',
answerList:[],
answerId: [],
analysis: '',
type: 0
},
rules: {
name: [{ required: true, message: '课程名为必填项', trigger: 'blur' }]
}
}
},
created() {
if(this.$route.query){
if(this.$route.query.id){
course.get({id: this.$route.query.id}).then(res=>{
this.temp= res.data
})
}
}
this.fetchData()
this.typeChange(1)
},
methods: {
fetchData() {
this.listLoading = true
course.getList({pageNo: 0, pageSize: 1000}).then(res=>{
if(res.code==200){
this.courseOptions = res.data.page.content
}
this.listLoading = false
})
level.getList().then(res=>{
if(res.code==200){
this.levelOptions = res.data.list
}
})
},
handleUpdate(row) {
this.temp2 = Object.assign({}, row) // copy obj
this.temp2.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
},
handleDelete(row,index){
this.childList.splice(index,1)
},
addMulti(){
this.temp.children = this.childList
question.add(this.temp).then(response=>{
if(response.code === 200){
this.temp.id = response.data;
this.$notify({
title: '操作成功',
message: "success",
type: 'success',
duration: 2000
})
}
})
},
add(){
let tmp = Object.assign({},this.temp2)
this.childList.push(tmp);
this.dialogFormVisible = false
},
changeUrl(val){
this.temp2.thumbnail = val
},
typeChange(val){
this.temp2.answerList=[]
this.temp2.answerId=[]
if(val == 1||val == 2){
this.temp2.answerList.push({ id: 1, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 2, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 3, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 4, title: '', img: '', check: false, correct: false });
}else{
this.temp2.answerList.push({ id: 1, title: '正确', img: '', correct: false});
this.temp2.answerList.push({ id: 2, title: '错误', img: '', correct: false});
}
},
indexToWord(index){
return String.fromCharCode(64+index)
},
cancel(item){
item.correct = false
const i = this.temp2.answerId.indexOf(item.id)
this.temp2.answerId.splice(i,1)
},
confirm(item){
if(this.temp2.questionType !=2){
this.temp2.answerList.forEach(i =>{ i.correct = false})
this.temp2.answerId = []
}
item.correct = true
if(this.temp2.answerId.includes(item.id) == false){
this.temp2.answerId.push(item.id)
}
}
}
}
</script>
<style scoped>
.tz-line{
display: flex;
width: 100%;
margin-bottom: 20px;
}
.tz-line button{
margin-left: 10px;
width: 100px;
}
.tz-flex{
display: flex;
flex-wrap: wrap;
}
.tz-flex .el-form-item,.el-select{
width: 50%;
}
.opt{
margin-bottom: 5px;
margin-right: 5px;
}
.correct{
display: flex;
width: 50px;
background-color: rgb(209, 208, 205);
align-items: center;
justify-content: center;
margin-right:5px;
border-radius: 5px;
color:white;
}
.opt .el-input{
margin-left: 5px;
margin-right: 5px;
}
.opt .el-checkbox{
margin-left: 5px;
}
.opt div{
display: flex;
width: 100%;
margin-top: 5px;
}
.tz-fixed {
margin-left: -100px;
}
</style>

@ -0,0 +1,358 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-button @click="$router.back()">
取消
</el-button>
<el-button type="primary" @click="addMulti">
确认
</el-button>
</div>
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="100px" style="margin-left:50px;">
<div class="tz-flex">
<el-form-item label="归属课程" prop="name">
<el-select v-model="temp.courseId" class="filter-item" placeholder="请选择">
<el-option v-for="item in courseOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="案例层次">
<el-select v-model="temp.levelId" class="filter-item" placeholder="请选择">
<el-option v-for="item in levelOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</div>
<el-form-item label="案例名称">
<el-input type="textarea" v-model="temp.stem" />
</el-form-item>
<el-form-item label="课程简介">
<editor style="margin-left: 0;"
api-key="wuyv0zkbaek2eni7uc4cj2q099vfhbibrj3cv5yjymq41bod"
initialValue=""
v-model="temp.content"
:init="{
height: 250,
menubar: false,
language:'zh_CN',
images_upload_url: '/api/upload/image/upload',
plugins: [
'advlist autolink lists link image charmap',
'searchreplace visualblocks code fullscreen',
'print preview anchor insertdatetime media',
'paste code help wordcount table'
],
toolbar:
' undo redo | formatselect | bold italic | \
alignleft aligncenter alignright | \
bullist numlist outdent indent | image | help'
}"
>
</editor>
</el-form-item>
<el-form-item>
<el-button @click="dialogFormVisible =true">添加步聚</el-button>
</el-form-item>
<el-form-item>
<el-table :data="childList" >
<el-table-column label="序号" align="center">
<template slot-scope="{$index}">
<span>{{ $index }}</span>
</template>
</el-table-column>
<el-table-column label="小题题干" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stem }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="350" class-name="small-padding fixed-width">
<template slot-scope="{row,$index}">
<el-button type="primary" size="mini" @click="handleUpdate(row)">
编辑
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="handleDelete(row,$index)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<el-dialog title="添加步聚" :visible.sync="dialogFormVisible">
<div class="app-container">
<div class="filter-container">
<el-button @click="dialogFormVisible = false">
取消
</el-button>
<el-button type="primary" @click="add">
确认
</el-button>
</div>
<el-form ref="dataForm" :rules="rules" :model="temp2" label-position="left" label-width="100px" style="margin-left:50px;">
<div class="tz-flex">
<el-form-item label="题型" prop="timestamp">
<el-select @change="typeChange" v-model="temp2.questionType" class="filter-item" placeholder="请选择">
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="分值" prop="timestamp">
<el-input-number v-model="temp2.score" :min="1" />
</el-form-item>
</div>
<el-form-item label="题干">
<el-input type="textarea" v-model="temp2.stem" />
</el-form-item>
<el-form-item label="选项">
<div v-for="item in temp2.answerList" :key="item.id" class="opt">
<div class="line">
<span class="correct" @dblclick="cancel(item)" @click="confirm(item)" :style="setCorrect(item)?'background-color:red; color:white':''" >{{ indexToWord(item.id) }}</span> <el-input v-model="item.title" />
</div>
</div>
</el-form-item>
<el-form-item label="答案">
<div style="display:flex">
<span class="correct" style="background-color:red; color:white" v-for="item in temp2.answerId" :key="item">{{ indexToWord(item) }}</span>
</div>
</el-form-item>
<el-form-item label="解析">
<el-input type="textarea" v-model="temp2.analysis" />
</el-form-item>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import * as course from '@/api/course'
import * as level from '@/api/level'
import * as question from '@/api/multiquestion'
import uploadImage from '@/components/Upload/SingleImage2.vue'
import Editor from '@tinymce/tinymce-vue'
export default {
components: {
'upload-image': uploadImage,
'editor': Editor
},
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: null,
listLoading: true,
listQuery: {
pageNo: 0
},
total: 0,
limit: 20,
textMap: {
update: 'Edit',
create: 'Create'
},
checkGroup:{
stem: false
},
dialogFormVisible: false,
courseOptions: [],
levelOptions: [],
typeOptions:[
{
id: 1,
name: '单选'
},
{
id: 2,
name: '多选'
},
{
id: 3,
name: '判断'
}
],
dialogStatus: 'Edit',
statusOptions: ['published', 'draft', 'deleted'],
childList:[],
temp: {
score: 1,
courseId: 1,
courseName: '',
levelId: 1,
levelName: '',
questionType: 1,
stem: '',
stemImg: '',
answerList:[],
answerId: [],
analysis: '',
type: 0
},
temp2: {
score: 1,
courseId: 1,
courseName: '',
levelId: 1,
levelName: '',
questionType: 1,
stem: '',
stemImg: '',
answerList:[],
answerId: [],
analysis: '',
type: 0
},
rules: {
name: [{ required: true, message: '课程名为必填项', trigger: 'blur' }]
}
}
},
created() {
if(this.$route.query){
if(this.$route.query.id){
question.get({id: this.$route.query.id}).then(res=>{
this.temp= res.data
this.childList = res.data.children
})
}
}
this.fetchData()
this.typeChange(1)
},
methods: {
fetchData() {
this.listLoading = true
course.getList({pageNo: 0, pageSize: 1000}).then(res=>{
if(res.code==200){
this.courseOptions = res.data.page.content
}
this.listLoading = false
})
level.getList().then(res=>{
if(res.code==200){
this.levelOptions = res.data.list
}
})
},
handleUpdate(row) {
this.temp2 = Object.assign({}, row) // copy obj
this.temp2.timestamp = new Date(this.temp.timestamp)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
},
handleDelete(row,index){
this.childList.splice(index,1)
},
addMulti(){
this.temp.children = this.childList
question.update(this.temp).then(response=>{
if(response.code === 200){
this.temp.id = response.data;
this.$notify({
title: '操作成功',
message: "success",
type: 'success',
duration: 2000
})
}
})
},
add(){
let tmp = Object.assign({},this.temp2)
this.childList.push(tmp);
this.dialogFormVisible = false
},
changeUrl(val){
this.temp2.thumbnail = val
},
typeChange(val){
this.temp2.answerList=[]
this.temp2.answerId=[]
if(val == 1||val == 2){
this.temp2.answerList.push({ id: 1, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 2, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 3, title: '', img: '', check: false, correct: false });
this.temp2.answerList.push({ id: 4, title: '', img: '', check: false, correct: false });
}else{
this.temp2.answerList.push({ id: 1, title: '正确', img: '', correct: false});
this.temp2.answerList.push({ id: 2, title: '错误', img: '', correct: false});
}
},
indexToWord(index){
return String.fromCharCode(64+index)
},
cancel(item){
item.correct = false
const i = this.temp2.answerId.indexOf(item.id)
this.temp2.answerId.splice(i,1)
},
confirm(item){
if(this.temp2.questionType !=2){
this.temp2.answerList.forEach(i =>{ i.correct = false})
this.temp2.answerId = []
}
item.correct = true
if(this.temp2.answerId.includes(item.id) == false){
this.temp2.answerId.push(item.id)
}
},
setCorrect(item){
return this.temp2.answerId.includes(item.id)
}
}
}
</script>
<style scoped>
.tz-line{
display: flex;
width: 100%;
margin-bottom: 20px;
}
.tz-line button{
margin-left: 10px;
width: 100px;
}
.tz-flex{
display: flex;
flex-wrap: wrap;
}
.tz-flex .el-form-item,.el-select{
width: 50%;
}
.opt{
margin-bottom: 5px;
margin-right: 5px;
}
.correct{
display: flex;
width: 50px;
background-color: rgb(209, 208, 205);
align-items: center;
justify-content: center;
margin-right:5px;
border-radius: 5px;
color:white;
}
.opt .el-input{
margin-left: 5px;
margin-right: 5px;
}
.opt .el-checkbox{
margin-left: 5px;
}
.opt div{
display: flex;
width: 100%;
margin-top: 5px;
}
.tz-fixed {
margin-left: -100px;
}
</style>

@ -0,0 +1,299 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form>
<el-form-item label="课程筛选">
<el-select v-model="temp.course" >
<el-option v-for="item in cousrseOptions" :key="item.id" :value="item.name">{{ item.name }}</el-option>
</el-select>
<el-input style="width: 200px;" placeholder="题干/题目ID" />
<el-button>查询</el-button>
<el-button>批量删除</el-button>
</el-form-item>
</el-form>
<el-button @click="$router.push({ path: '/resource/anli/add'})" >新增</el-button>
<el-button>批量导入</el-button>
<el-button @click="batch(1)"></el-button>
<el-button @click="batch(0)"></el-button>
</div>
<div class="tz-line">
<el-checkbox label="全选" v-model="checkAll" @change="selectAll" />
</div>
<el-table
v-loading="listLoading"
:data="list"
element-loading-text="Loading"
border
fit
highlight-current-row
>
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<input type="checkbox" name="checkList" :data-id="scope.row.id" />
</template>
</el-table-column>
<el-table-column label="选择" width="60px" align="center">
<template slot-scope="scope">
<el-checkbox v-model="checkList" :key="scope.row.id" />
</template>
</el-table-column>
<el-table-column label="案例名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stem }}</span>
</template>
</el-table-column>
<el-table-column label="导入日期" align="center">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).Format("yyyy-MM-dd") }}</span>
</template>
</el-table-column>
<el-table-column label="案例层次" align="center">
<template slot-scope="scope">
<span>{{ levelToName(scope.row.levelId) }}</span>
</template>
</el-table-column>
<el-table-column label="归属课程" align="center">
<template slot-scope="scope">
<span>{{ courseToName(scope.row.courseId) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="350" class-name="small-padding fixed-width">
<template slot-scope="{row,$index}">
<el-button type="primary" size="mini" @click="updateStatus(row,1)">
上架
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="updateStatus(row,0)">
下架
</el-button>
<el-button type="primary" size="mini" @click="handleUpdate(row)">
查看
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="handleDelete(row,$index)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="listQuery.pageNo"
:page-sizes="[10,15,20]"
:page-size="limit"
layout="total,prev,pager,next,jumper,sizes"
:total="total"
/>
</div>
</template>
<script>
import * as course from '@/api/course'
import * as level from '@/api/level'
import * as question from '@/api/multiquestion'
export default {
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: [],
listLoading: true,
listQuery: {
pageNo: 0,
courseId: 0,
stem: '',
type: 1
},
total: 0,
limit: 20,
textMap: {
update: 'Edit',
create: 'Create'
},
checkAll: false,
isIndeterminate: true,
dialogFormVisible: false,
cousrseOptions:[],
levelOption:[],
checkList:[],
checkedArr:[],
dialogStatus: '',
statusOptions: ['published', 'draft', 'deleted'],
temp: {
},
rules: {
type: [{ required: true, message: 'type is required', trigger: 'change' }],
timestamp: [{ type: 'date', required: true, message: 'timestamp is required', trigger: 'change' }],
title: [{ required: true, message: 'title is required', trigger: 'blur' }]
},
typeOptions:[
{
type: 1,
name: '单选'
},
{
type: 2,
name: '多选'
},
{
type: 3,
name: '判断'
}
]
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.listLoading = true
question.getList(this.listQuery).then(res => {
if(res.code==200){
const onePage = res.data.page
this.list = onePage.content
for(var i =0; i<this.list.length;i++){
this.list.checked = true;
}
this.total = onePage.totalElements
}
this.listLoading = false
})
course.getList({pageNo: 0,pageSize:100}).then(res=>{
this.cousrseOptions = res.data.page.content;
})
level.getList().then(res=>{
if(res.code == 200){
this.levelOption = res.data.list
}
})
},
handleUpdate(row) {
this.$router.push({
path: '/resource/anli/edit',
query: {id: row.id}
})
},
handleDelete(item,index){
question.del(item).then(response => {
if(response.code === 200){
this.list.splice(index,1)
}
})
},
updateStatus(item,status){
item.status = status
question.batch({ids:[item.id],status: status}).then(response=>{
if(response.code === 200){
if(status==0){
this.$notify({
title: '下架成功',
message: "success",
type: 'success',
duration: 2000
})
}else{
this.$notify({
title: '上架成功',
message: "success",
type: 'success',
duration: 2000
})
}
}
})
},
typeToName(type){
const t = this.typeOptions.find((t) => { return t.type == type})
if(t){
return this.typeOptions.find((t) => { return t.type == type}).name
}
return ''
},
levelToName(level){
if(this.levelOption.length>0){
const l = this.levelOption.find((l) => { return l.id == level })
if(l){
return l.name
}
}
return ''
},
courseToName(id){
if(this.cousrseOptions.length>0 ){
const c = this.cousrseOptions.find((l) => { return l.id == id })
if(c){
return c.name
}
}
},
selectAll(val){
let cks = document.getElementsByName("checkList")
console.log(cks.length)
for(var i=0;i<cks.length;i++){
cks[i].checked = val;
}
},
batch(stat){
let ids =[]
let cks = document.getElementsByName("checkList")
for(var i=0;i<cks.length;i++){
if(cks[i].checked){
ids.push(cks[i].getAttribute("data-id"))
}
}
if(ids.length>0){
question.batch({ids:ids,status: stat}).then(res=>{
if(res.code==200){
if(stat==0){
this.$notify({
title: '下架成功',
message: "success",
type: 'success',
duration: 2000
})
}else{
this.$notify({
title: '上架成功',
message: "success",
type: 'success',
duration: 2000
})
}
}
})
}
}
},
watch:{
"checkList" : function(){
if(this.checkList.length == this.checkedArr.length){
this.checkAll = true
}else{
this.checkAll = false
}
}
}
}
</script>
<style scoped>
.tz-line{
display: flex;
width: 100%;
margin-bottom: 10px;
margin-top: 10px;
}
.tz-line button{
margin-left: 10px;
}
</style>

@ -0,0 +1,3 @@
<template>
<router-view />
</template>

@ -57,7 +57,7 @@
import * as tag from '@/api/courseTag'
import * as cat from '@/api/courseCat'
import * as course from '@/api/course'
import uploadImage from '@/components/Upload/SingleImage.vue'
import uploadImage from '@/components/Upload/SingleImage2.vue'
import Editor from '@tinymce/tinymce-vue'
export default {

@ -34,7 +34,7 @@
</el-table-column>
<el-table-column label="创建时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
<span>{{ new Date(scope.row.createTime).Format("yyyy-MM-dd") }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300" class-name="small-padding fixed-width">

@ -1 +1,5 @@
batch
<template>
<div class="app-container">
akdk
</div>
</template>

@ -167,7 +167,7 @@ export default {
})
},
add(){
question.add(this.temp).then(response=>{
question.update(this.temp).then(response=>{
if(response.code === 200){
this.$notify({
title: '操作成功',

@ -113,7 +113,7 @@ export default {
statusOptions: ['published', 'draft', 'deleted'],
temp: {
score: 1,
courseId: 0,
courseId: 1,
courseName: '',
levelId: 1,
levelName: '',
@ -122,7 +122,8 @@ export default {
stemImg: '',
answerList:[],
answerId: [],
analysis: ''
analysis: '',
type: 0
},
rules: {
name: [{ required: true, message: '课程名为必填项', trigger: 'blur' }]
@ -165,6 +166,7 @@ export default {
})
},
add(){
this.temp.type=0
question.add(this.temp).then(response=>{
if(response.code === 200){
this.$notify({

@ -0,0 +1,296 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form>
<el-form-item label="课程筛选">
<el-select v-model="temp.course" >
<el-option v-for="item in cousrseOptions" :key="item.id" :value="item.name">{{ item.name }}</el-option>
</el-select>
<el-input style="width: 200px;" placeholder="题干/题目ID" />
<el-button>查询</el-button>
<el-button>批量删除</el-button>
</el-form-item>
</el-form>
<el-button @click="$router.push({ path: '/resource/exam/add'})" >新增</el-button>
<el-button>批量导入</el-button>
<el-button @click="batch(1)"></el-button>
<el-button @click="batch(0)"></el-button>
</div>
<div class="tz-line">
<el-checkbox label="全选" v-model="checkAll" @change="selectAll" />
</div>
<el-table
v-loading="listLoading"
:data="list"
element-loading-text="Loading"
border
fit
highlight-current-row
>
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="选择" width="60px" align="center">
<template slot-scope="scope">
<el-checkbox v-model="checkList" :key="scope.row.id" />
</template>
</el-table-column>
<el-table-column label="案例名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.stem }}</span>
</template>
</el-table-column>
<el-table-column label="导入日期" align="center">
<template slot-scope="scope">
<span>{{ new Date(scope.row.createTime).Format("yyyy-MM-dd") }}</span>
</template>
</el-table-column>
<el-table-column label="案例层次" align="center">
<template slot-scope="scope">
<span>{{ levelToName(scope.row.levelId) }}</span>
</template>
</el-table-column>
<el-table-column label="归属课程" align="center">
<template slot-scope="scope">
<span>{{ courseToName(scope.row.courseId) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="350" class-name="small-padding fixed-width">
<template slot-scope="{row,$index}">
<el-button type="primary" size="mini" @click="updateStatus(row,1)">
上架
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="updateStatus(row,0)">
下架
</el-button>
<el-button type="primary" size="mini" @click="handleUpdate(row)">
查看
</el-button>
<el-button v-if="row.status!='deleted'" size="mini" type="danger" @click="handleDelete(row,$index)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="listQuery.pageNo"
:page-sizes="[10,15,20]"
:page-size="limit"
layout="total,prev,pager,next,jumper,sizes"
:total="total"
/>
</div>
</template>
<script>
import * as course from '@/api/course'
import * as level from '@/api/level'
import * as question from '@/api/question'
export default {
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'info',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: [],
listLoading: true,
listQuery: {
pageNo: 0,
courseId: 0,
stem: '',
type: 1
},
total: 0,
limit: 20,
textMap: {
update: 'Edit',
create: 'Create'
},
checkAll: false,
isIndeterminate: true,
dialogFormVisible: false,
cousrseOptions:[],
levelOption:[],
checkList:[],
checkedArr:[],
dialogStatus: '',
statusOptions: ['published', 'draft', 'deleted'],
temp: {
},
rules: {
type: [{ required: true, message: 'type is required', trigger: 'change' }],
timestamp: [{ type: 'date', required: true, message: 'timestamp is required', trigger: 'change' }],
title: [{ required: true, message: 'title is required', trigger: 'blur' }]
},
typeOptions:[
{
type: 1,
name: '单选'
},
{
type: 2,
name: '多选'
},
{
type: 3,
name: '判断'
}
]
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.listLoading = true
question.getList(this.listQuery).then(res => {
if(res.code==200){
const onePage = res.data.page
this.list = onePage.content
for(var i =0; i<this.list.length;i++){
this.list.checked = true;
}
this.total = onePage.totalElements
}
this.listLoading = false
})
course.getList({pageNo: 0,pageSize:100}).then(res=>{
this.cousrseOptions = res.data.page.content;
})
level.getList().then(res=>{
if(res.code == 200){
this.levelOption = res.data.list
}
})
},
handleUpdate(row) {
this.$router.push({
path: '/resource/exam/edit',
query: {id: row.id}
})
},
handleDelete(item,index){
question.del(item).then(response => {
if(response.code === 200){
this.list.splice(index,1)
}
})
},
updateStatus(item,status){
item.status = status
question.batch({ids:[item.id],status: status}).then(response=>{
if(response.code === 200){
if(status==0){
this.$notify({
title: '下架成功',
message: "success",
type: 'success',
duration: 2000
})
}else{
this.$notify({
title: '上架成功',
message: "success",
type: 'success',
duration: 2000
})
}
}
})
},
typeToName(type){
const t = this.typeOptions.find((t) => { return t.type == type})
if(t){
return this.typeOptions.find((t) => { return t.type == type}).name
}
return ''
},
levelToName(level){
if(this.levelOption.length>0){
const l = this.levelOption.find((l) => { return l.id == level })
if(l){
return l.name
}
}
return ''
},
courseToName(id){
if(this.levelOption.length>0 ){
const c = this.cousrseOptions.find((l) => { return l.id == level })
if(c){
return c.name
}
}
},
selectAll(val){
if(this.checkAll){
this.checkList = []
this.list.filter(item => item.checked).forEach( item => checkList.push(item.id))
}else{
this.checkList = []
}
},
batch(stat){
let ids =[]
console.log(this.checkList)
// this.list.filter(item => item.checked).forEach( item => ids.push(item.id))
// console.log(ids)
// if(ids.length>0){
// question.batch({ids:ids,status: stat}).then(res=>{
// if(res.code==200){
// if(stat==0){
// this.$notify({
// title: '',
// message: "success",
// type: 'success',
// duration: 2000
// })
// }else{
// this.$notify({
// title: '',
// message: "success",
// type: 'success',
// duration: 2000
// })
// }
// }
// })
// }
}
},
watch:{
"checkList" : function(){
if(this.checkList.length == this.checkedArr.length){
this.checkAll = true
}else{
this.checkAll = false
}
}
}
}
</script>
<style scoped>
.tz-line{
display: flex;
width: 100%;
margin-bottom: 10px;
margin-top: 10px;
}
.tz-line button{
margin-left: 10px;
}
</style>

@ -3,11 +3,11 @@
<div class="filter-container">
<el-form>
<el-form-item label="课程筛选">
<el-select v-model="temp.course" >
<el-select v-model="listQuery.couserId" >
<el-option v-for="item in cousrseOptions" :key="item.id" :value="item.name">{{ item.name }}</el-option>
</el-select>
<el-input style="width: 200px;" placeholder="题干/题目ID" />
<el-button>查询</el-button>
<el-input v-model="listQuery.stem" style="width: 200px;" placeholder="题干/题目ID" />
<el-button @click="fetchData"></el-button>
<el-button>批量删除</el-button>
</el-form-item>
</el-form>
@ -19,7 +19,7 @@
</div>
<div class="tz-line">
<el-checkbox label="全选" @change="selectAll" />
<el-checkbox label="全选" v-model="checkAll" @change="selectAll" />
</div>
<el-table
v-loading="listLoading"
@ -32,7 +32,8 @@
<el-table-column label="选择" width="60px" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.checked" :key="scope.row.id" />
<!-- <el-checkbox :key="scope.row.id" v-model="scope.row.checked" /> -->
<input type="checkbox" name="checkList" :data-id="scope.row.id" />
</template>
</el-table-column>
<el-table-column label="序号" align="center">
@ -47,7 +48,7 @@
</el-table-column>
<el-table-column label="导入日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
<span>{{ new Date(scope.row.createTime).Format("yyyy-MM-dd") }}</span>
</template>
</el-table-column>
<el-table-column label="题型" align="center">
@ -115,7 +116,8 @@ export default {
listQuery: {
pageNo: 0,
courseId: 0,
stem: ''
stem: '',
type:0
},
total: 0,
limit: 20,
@ -124,12 +126,12 @@ export default {
create: 'Create'
},
checkAll: false,
cMap: new Map(),
isIndeterminate: true,
dialogFormVisible: false,
cousrseOptions:[],
levelOption:[],
checkList:[],
checkedArr:[],
dialogStatus: '',
statusOptions: ['published', 'draft', 'deleted'],
temp: {
@ -156,6 +158,14 @@ export default {
}
},
created() {
course.getList({pageNo: 0,pageSize:100}).then(res=>{
this.cousrseOptions = res.data.page.content;
})
level.getList().then(res=>{
if(res.code == 200){
this.levelOption = res.data.list
}
})
this.fetchData()
},
methods: {
@ -165,22 +175,13 @@ export default {
if(res.code==200){
const onePage = res.data.page
this.list = onePage.content
for(var i =0; i<this.list.length;i++){
this.list.checked = true;
}
this.list.forEach(item => item.checked=false)
this.total = onePage.totalElements
}
this.listLoading = false
})
course.getList({pageNo: 0,pageSize:100}).then(res=>{
this.cousrseOptions = res.data.page.content;
})
level.getList().then(res=>{
if(res.code == 200){
this.levelOption = res.data.list
}
})
},
handleUpdate(row) {
this.$router.push({
@ -197,7 +198,7 @@ export default {
},
updateStatus(item,status){
item.status = status
question.update(item).then(response=>{
question.batch({ids:[item.id],status: status}).then(response=>{
if(response.code === 200){
if(status==0){
this.$notify({
@ -218,9 +219,9 @@ export default {
})
},
typeToName(type){
const t = this.typeOptions.find((t) => { return t.type = type})
const t = this.typeOptions.find((t) => { return t.type == type})
if(t){
return this.typeOptions.find((t) => { return t.type = type}).name
return this.typeOptions.find((t) => { return t.type == type}).name
}
return ''
},
@ -234,20 +235,36 @@ export default {
return ''
},
courseToName(id){
if(this.levelOption.length>0 ){
const c = this.cousrseOptions.find((l) => { return l.id == level })
if(this.cousrseOptions.length>0 ){
const c = this.cousrseOptions.find((l) => { return l.id == id })
if(c){
return c.name
}
}
},
selectAll(val){
this.list.forEach(i => i.checked = val)
let cks = document.getElementsByName("checkList")
console.log(cks.length)
for(var i=0;i<cks.length;i++){
cks[i].checked = val;
}
//this.list.forEach(i => i.checked = val)
// if(this.checkAll){
// this.checkList = []
// this.list.filter(item => item.checked).forEach( item => checkList.push(item.id))
// }else{
// this.checkList = []
// }
},
batch(stat){
let ids =[]
this.list.filter(item => item.checked).forEach( item => ids.push(item.id))
console.log(ids)
let cks = document.getElementsByName("checkList")
for(var i=0;i<cks.length;i++){
if(cks[i].checked){
ids.push(cks[i].getAttribute("data-id"))
}
}
if(ids.length>0){
question.batch({ids:ids,status: stat}).then(res=>{
if(res.code==200){

@ -0,0 +1,17 @@
spring:
application:
name: tz-gateway
cloud:
nacos:
username: nacos
password: nacos
discovery:
server-addr: 127.0.0.1:8848
namespace: ${spring.profiles.active}
config:
file-extension: yaml
namespace: ${spring.profiles.active}
profiles:
active: dev
server:
port: 50010
Loading…
Cancel
Save