fixLog
yujialong 1 year ago
parent 2dd6c79475
commit 426dd83370
  1. 114
      src/views/match/add/index.vue
  2. 8
      src/views/match/manage/matchRank.vue
  3. 1
      src/views/order/AddOrder.vue
  4. 16
      src/views/serve/addModel.vue
  5. 26
      src/views/serve/backstage/index.vue
  6. 3
      src/views/serve/backstage/modelType.vue
  7. 8
      src/views/serve/backstage/sourceModel.vue
  8. 41
      src/views/serve/backstage/sourceType.vue

@ -1,32 +1,51 @@
<template> <template>
<div> <div>
<el-card v-if="!id" shadow="hover" class="m-b-20"> <el-card v-if="!id"
shadow="hover"
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="back" :content="'创建赛事'"></el-page-header> <el-page-header @back="back"
:content="'创建赛事'"></el-page-header>
</div> </div>
</el-card> </el-card>
<div v-if="step === 1 || (id && !editing)" :class="['type-wrap', {pd: !id}]"> <div v-if="step === 1 || (id && !editing)"
:class="['type-wrap', {pd: !id}]">
<div class="p-title">大赛发布类型</div> <div class="p-title">大赛发布类型</div>
<el-form label-width="100px" label-suffix=":" size="small" :disabled="!editing && id != ''"> <el-form label-width="100px"
label-suffix=":"
size="small"
:disabled="!editing && id != ''">
<el-form-item label="请选择类型"> <el-form-item label="请选择类型">
<el-radio v-model="releaseType" :label="0">仅发布信息</el-radio> <el-radio v-model="releaseType"
<el-radio v-model="releaseType" :label="1">设置完整比赛</el-radio> :label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType"
:label="1">设置完整比赛</el-radio>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button v-if="!editing && id" class="edit" type="primary" @click="editing = 1" v-auth="'/match:管理:大赛详情:编辑'">编辑</el-button> <el-button v-if="!editing && id"
class="edit"
type="primary"
@click="editing = 1"
v-auth="'/match:管理:大赛详情:编辑'">编辑</el-button>
</div> </div>
<el-card v-if="step !== 4" shadow="hover" class="m-b-20" style="position: relative;margin-top: 20px"> <el-card v-if="step !== 4"
shadow="hover"
class="m-b-20"
style="position: relative;margin-top: 20px">
<ul :class="['steps', {pointer: !editing && id && publishStatus}]"> <ul :class="['steps', {pointer: !editing && id && publishStatus}]">
<li :class="{active: step === 1,done: step > 1}" @click="toStep(1)"> <li :class="{active: step === 1,done: step > 1}"
@click="toStep(1)">
<span class="circle">1</span> <span class="circle">1</span>
<p class="text">大赛信息填写</p> <p class="text">大赛信息填写</p>
</li> </li>
<template v-if="releaseType"> <template v-if="releaseType">
<li :class="{active: step === 2,done: step > 2}" @click="toStep(2)"> <li :class="{active: step === 2,done: step > 2}"
@click="toStep(2)">
<span class="circle circle2">2</span> <span class="circle circle2">2</span>
<p class="text">赛程与规则设置</p> <p class="text">赛程与规则设置</p>
</li> </li>
<li :class="{active: step === 3,done: step > 3}" @click="toStep(3)"> <li :class="{active: step === 3,done: step > 3}"
@click="toStep(3)">
<span class="circle circle3">3</span> <span class="circle circle3">3</span>
<p class="text">比赛内容设置</p> <p class="text">比赛内容设置</p>
</li> </li>
@ -39,20 +58,43 @@
</el-card> </el-card>
<div class="page"> <div class="page">
<div class="page-content"> <div class="page-content">
<step1 v-show="step === 1" ref="step1" :editing.sync="editing" @next="next" /> <step1 v-show="step === 1"
<step2 v-if="step === 2" ref="step2" :editing.sync="editing" :setupId.sync="setupId" @next="next" /> ref="step1"
<step3 v-if="step === 3" ref="step3" :editing.sync="editing" :setupId.sync="setupId" :competitionId.sync="competitionId" @next="next" /> :editing.sync="editing"
<step4 v-if="step === 4" /> @next="next" />
<step2 v-if="step === 2"
ref="step2"
:editing.sync="editing"
:setupId.sync="setupId"
@next="next" />
<step3 v-if="step === 3"
ref="step3"
:editing.sync="editing"
:setupId.sync="setupId"
:competitionId.sync="competitionId"
@next="next" />
<step4 v-if="step === 4"
ref="step4" />
<div v-if="step !== 4 && showBtns" class="btns"> <div v-if="step !== 4 && showBtns"
class="btns">
<!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 --> <!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 -->
<template v-if="editing || !id"> <template v-if="editing || !id">
<el-button v-if="!publishStatus" @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button> <el-button v-if="!publishStatus"
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev">上一步</el-button> @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)" type="primary" @click="save(1)">发布</el-button> <el-button v-if="step === 2 || step === 3"
<el-button v-else type="primary" @click="save(id ? 1 : 0, 2)">保存并下一步</el-button> type="primary"
@click="prev">上一步</el-button>
<el-button v-if="!releaseType || (releaseType && step === 3)"
type="primary"
@click="save(1)">发布</el-button>
<el-button v-else
type="primary"
@click="save(id ? 1 : 0, 2)">保存并下一步</el-button>
</template> </template>
<el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button> <el-button type="danger"
@click="preview"
v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
<el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button> <el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button>
</div> </div>
</div> </div>
@ -70,7 +112,7 @@ import step4 from './step4'
import { Loading } from 'element-ui' import { Loading } from 'element-ui'
export default { export default {
name: "add", name: "add",
data() { data () {
return { return {
id: this.$route.query.id || '', id: this.$route.query.id || '',
cache: this.$store.state.competitionCache, cache: this.$store.state.competitionCache,
@ -93,12 +135,12 @@ export default {
step3, step3,
step4 step4
}, },
mounted() { mounted () {
}, },
methods: { methods: {
// //
resumeData() { resumeData () {
if (this.cache) { if (this.cache) {
this.step = 3 this.step = 3
this.editing = true this.editing = true
@ -106,19 +148,19 @@ export default {
} }
}, },
// loading // loading
showLoad() { showLoad () {
this.loadIns = Loading.service() this.loadIns = Loading.service()
}, },
// loading // loading
hideLoad() { hideLoad () {
this.loadIns.close() this.loadIns.close()
}, },
// //
save(status, next = 0) { save (status, next = 0) {
this.$refs['step' + this.step].save(status, next, this.releaseType) this.$refs['step' + this.step].save(status, next, this.releaseType)
}, },
// //
prev() { prev () {
// //
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
if (updateTime) { if (updateTime) {
@ -134,7 +176,7 @@ export default {
} }
}, },
// //
next(next, setupId, competitionId) { next (next, setupId, competitionId) {
if (!next) { if (!next) {
this.$router.push(`/match?page=${this.$store.state.matchPage}`) this.$router.push(`/match?page=${this.$store.state.matchPage}`)
} else if (next === 2) { } else if (next === 2) {
@ -150,16 +192,16 @@ export default {
} }
}, },
// //
toStep(i) { toStep (i) {
if (this.publishStatus && this.id && !this.editing) this.step = i if (this.publishStatus && this.id && !this.editing) this.step = i
}, },
// //
preview() { preview () {
util.local.set('match', this.$refs.step1.form) util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href) window.open(this.$router.resolve('/matchPreview').href)
}, },
// //
cancel() { cancel () {
// //
if (this.editing && this.$route.query.name) { if (this.editing && this.$route.query.name) {
// //
@ -179,7 +221,7 @@ export default {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
} }
}, },
back() { back () {
// //
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && updateTime) { if (this.step < 4 && updateTime) {
@ -194,7 +236,7 @@ export default {
this.backPage() this.backPage()
} }
}, },
backPage() { backPage () {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
} }
} }
@ -256,10 +298,10 @@ export default {
.circle { .circle {
color: #fff; color: #fff;
border-color: #459ffb; border-color: #459ffb;
background: #007EFF; background: #007eff;
} }
.text { .text {
color: #007EFF; color: #007eff;
} }
} }
.done { .done {

@ -618,11 +618,11 @@ export default {
} else { } else {
try { try {
// //
if (this.timeId) { // if (this.timeId) {
await this.$post(`${this.api.cancelCompetitionStageRankingTime}?releaseId=${this.timeId}`) await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`)
} else { // } else {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`)
} // }
this.sourceType = '' this.sourceType = ''
this.type = 0 this.type = 0
this.getData() this.getData()

@ -2858,6 +2858,7 @@ export default {
}, },
// //
submitShip () { submitShip () {
if (this.shipContent.length > 300) return this.$message.error('请填写300个字以内!')
this.curRow.shipContent = this.shipContent this.curRow.shipContent = this.shipContent
this.shipVisible = false this.shipVisible = false
}, },

@ -61,9 +61,9 @@ export default {
components: { codemirror }, components: { codemirror },
data () { data () {
return { return {
categoryId: Number(this.$route.query.categoryId), categoryId: +this.$route.query.categoryId,
id: Number(this.$route.query.id), id: +this.$route.query.id,
postStatus: Number(this.$route.query.postStatus), postStatus: +this.$route.query.postStatus,
isSchool: this.$route.query.isSchool == 1 ? true : false, // isSchool: this.$route.query.isSchool == 1 ? true : false, //
isDetail: Boolean(this.$route.query.show), // isDetail: Boolean(this.$route.query.show), //
isModel: Boolean(this.$route.query.model), // isModel: Boolean(this.$route.query.model), //
@ -107,19 +107,21 @@ export default {
modelDemo modelDemo
} }
this.handleId(this.categoryList, categoryId) this.handleId(this.categoryList, categoryId)
console.log("🚀 ~ file: addModel.vue:112 ~ getData ~ codeKey:", this.categoryIdCus)
this.codeKey++ this.codeKey++
}, },
// id // id
handleId (list, id, parentId = []) { handleId (list, id, parentId = []) {
list.map(e => { for (const e of list) {
// idid // idid
if (id === e.id) { if (id === e.id) {
parentId.shift() // id // parentId.shift() // id
this.categoryIdCus = [...parentId, e.id] this.categoryIdCus = [...parentId, e.id]
break
} else { } else {
e.children && this.handleId(e.children, id, [...parentId, e.id]) e.children && this.handleId(e.children, id, [...parentId, e.id])
} }
}) }
}, },
// //
getType () { getType () {
@ -140,7 +142,7 @@ export default {
if (this.id) { if (this.id) {
this.getData() this.getData()
} else { } else {
this.handleId(data, this.categoryId) this.handleId(data[0].children, this.categoryId)
} }
}).catch(res => { }) }).catch(res => { })
}, },

@ -1,11 +1,18 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
<el-page-header :content="'系统后台 / '+ $route.query.name" @back="back"></el-page-header> class="mgb20">
<el-page-header :content="'系统后台 / '+ $route.query.name"
@back="back"></el-page-header>
</el-card> </el-card>
<div class="page" style="padding: 0"> <div class="page"
style="padding: 0">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<model v-if="active == 'model'"></model> <model v-if="active == 'model'"></model>
@ -18,7 +25,7 @@
import model from "./model"; import model from "./model";
import sourceModel from "./sourceModel"; import sourceModel from "./sourceModel";
export default { export default {
data() { data () {
return { return {
active: this.$route.query.type || 'model', active: this.$route.query.type || 'model',
tabs: { tabs: {
@ -34,9 +41,9 @@ export default {
model, model,
sourceModel sourceModel
}, },
created() {}, created () { },
methods: { methods: {
tabChange(index) { tabChange (index) {
this.active = index this.active = index
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
@ -44,11 +51,12 @@ export default {
...this.$route.query, ...this.$route.query,
page: 1, page: 1,
type: index, type: index,
categoryId: '' categoryId: '',
school: 0
} }
}) })
}, },
back() { back () {
this.$router.push('/configure') this.$router.push('/configure')
} }
} }

@ -10,7 +10,8 @@
<el-button type="text" <el-button type="text"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="syncModel">同步原始模型列表</el-button> @click="syncModel">同步原始模型列表</el-button>
<el-button type="text" <el-button v-if="!orgList.length"
type="text"
@click="addType(0)">添加</el-button> @click="addType(0)">添加</el-button>
</div> </div>
<org-tree v-if="orgList.length" <org-tree v-if="orgList.length"

@ -188,7 +188,7 @@ export default {
modelName: this.keyword, modelName: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
categoryId: curNode.id, categoryId: this.isSchool ? '' : curNode.id,
founder: this.isSchool ? 1 : 0 founder: this.isSchool ? 1 : 0
}) })
this.listData = data.records this.listData = data.records
@ -265,6 +265,12 @@ export default {
modelName: row.modelName, modelName: row.modelName,
systemId: this.systemId systemId: this.systemId
}) })
//
const { tree } = this.$refs
tree.modelType = 0
tree.$refs.tree.setCurrentKey(ids[ids.length - 1])
this.isSchool = 0
this.getList()
this.$message.success('复制成功!') this.$message.success('复制成功!')
this.copyVisible = false this.copyVisible = false
}, },

@ -1,7 +1,19 @@
<template> <template>
<div> <div>
<div> <div>
<el-tree :data="orgList" <el-radio-group v-model="modelType"
@change="changeModelType">
<div style="margin-bottom: 10px">
<el-radio :label="0">内置模型</el-radio>
</div>
<div>
<el-radio :label="1">院校创建</el-radio>
</div>
</el-radio-group>
<el-divider></el-divider>
<el-tree v-show="!modelType"
:data="orgList"
ref="tree" ref="tree"
default-expand-all default-expand-all
node-key="id" node-key="id"
@ -30,8 +42,9 @@
</span> </span>
</span> </span>
</el-tree> </el-tree>
<div :class="['school-create', {active: schoolActive}]" <div v-show="modelType"
@click="schoolClick">院校创建</div> class="school-create active"
@click="schoolClick">全部</div>
</div> </div>
<el-dialog :title="Form.id ? '编辑分类' : '新增分类'" <el-dialog :title="Form.id ? '编辑分类' : '新增分类'"
@ -63,6 +76,7 @@ export default {
data () { data () {
return { return {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
modelType: +this.$route.query.school,
orgList: [], orgList: [],
typeVisible: false, typeVisible: false,
Form: { Form: {
@ -76,7 +90,6 @@ export default {
{ required: true, message: "请输入分类名称", trigger: "blur" } { required: true, message: "请输入分类名称", trigger: "blur" }
] ]
}, },
schoolActive: false
}; };
}, },
mounted () { mounted () {
@ -87,12 +100,10 @@ export default {
getType () { getType () {
this.$post(this.api.sourceModelClassification + '?founder=0').then(({ data }) => { this.$post(this.api.sourceModelClassification + '?founder=0').then(({ data }) => {
this.orgList = data this.orgList = data
this.$parent.categories = data if (data.length) this.$parent.categories = data[0].children
data.length && this.$nextTick(() => { data.length && this.$nextTick(() => {
const { categoryId, school } = this.$route.query const { categoryId, school } = this.$route.query
if (school == 1) { if (school == 0) {
this.schoolActive = +school
} else {
this.$refs.tree.setCurrentKey(categoryId || data[0].id) this.$refs.tree.setCurrentKey(categoryId || data[0].id)
} }
this.$router.push({ this.$router.push({
@ -107,9 +118,20 @@ export default {
}) })
}).catch(res => { }) }).catch(res => { })
}, },
//
changeModelType (val) {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: '',
school: val
}
}).catch(err => { })
this.$emit('initData', val)
},
// //
getSingle () { getSingle () {
this.schoolActive = false
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
query: { query: {
@ -123,7 +145,6 @@ export default {
// //
schoolClick () { schoolClick () {
this.$refs.tree.setCurrentKey(null) this.$refs.tree.setCurrentKey(null)
this.schoolActive = true
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
query: { query: {

Loading…
Cancel
Save