fixLog
yujialong 2 years 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>
<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">
<el-page-header @back="back" :content="'创建赛事'"></el-page-header>
<el-page-header @back="back"
:content="'创建赛事'"></el-page-header>
</div>
</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>
<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-radio v-model="releaseType" :label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType" :label="1">设置完整比赛</el-radio>
<el-radio v-model="releaseType"
:label="0">仅发布信息</el-radio>
<el-radio v-model="releaseType"
:label="1">设置完整比赛</el-radio>
</el-form-item>
</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>
<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}]">
<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>
<p class="text">大赛信息填写</p>
</li>
<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>
<p class="text">赛程与规则设置</p>
</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>
<p class="text">比赛内容设置</p>
</li>
@ -39,20 +58,43 @@
</el-card>
<div class="page">
<div class="page-content">
<step1 v-show="step === 1" ref="step1" :editing.sync="editing" @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" />
<step1 v-show="step === 1"
ref="step1"
:editing.sync="editing"
@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">
<el-button v-if="!publishStatus" @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="step === 2 || step === 3" 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>
<el-button v-if="!publishStatus"
@click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-if="step === 2 || step === 3"
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>
<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>
</div>
</div>
@ -70,7 +112,7 @@ import step4 from './step4'
import { Loading } from 'element-ui'
export default {
name: "add",
data() {
data () {
return {
id: this.$route.query.id || '',
cache: this.$store.state.competitionCache,
@ -93,12 +135,12 @@ export default {
step3,
step4
},
mounted() {
mounted () {
},
methods: {
//
resumeData() {
resumeData () {
if (this.cache) {
this.step = 3
this.editing = true
@ -106,19 +148,19 @@ export default {
}
},
// loading
showLoad() {
showLoad () {
this.loadIns = Loading.service()
},
// loading
hideLoad() {
hideLoad () {
this.loadIns.close()
},
//
save(status, next = 0) {
save (status, next = 0) {
this.$refs['step' + this.step].save(status, next, this.releaseType)
},
//
prev() {
prev () {
//
const { updateTime } = this.$refs['step' + this.step]
if (updateTime) {
@ -134,7 +176,7 @@ export default {
}
},
//
next(next, setupId, competitionId) {
next (next, setupId, competitionId) {
if (!next) {
this.$router.push(`/match?page=${this.$store.state.matchPage}`)
} else if (next === 2) {
@ -150,16 +192,16 @@ export default {
}
},
//
toStep(i) {
toStep (i) {
if (this.publishStatus && this.id && !this.editing) this.step = i
},
//
preview() {
preview () {
util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href)
},
//
cancel() {
cancel () {
//
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}`)
}
},
back() {
back () {
//
const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && updateTime) {
@ -194,7 +236,7 @@ export default {
this.backPage()
}
},
backPage() {
backPage () {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
}
}
@ -256,10 +298,10 @@ export default {
.circle {
color: #fff;
border-color: #459ffb;
background: #007EFF;
background: #007eff;
}
.text {
color: #007EFF;
color: #007eff;
}
}
.done {

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

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

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

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

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

@ -188,7 +188,7 @@ export default {
modelName: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
categoryId: curNode.id,
categoryId: this.isSchool ? '' : curNode.id,
founder: this.isSchool ? 1 : 0
})
this.listData = data.records
@ -265,6 +265,12 @@ export default {
modelName: row.modelName,
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.copyVisible = false
},

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

Loading…
Cancel
Save