Branch_d40a2540
yujialong 2 years ago
parent 7b74f1a498
commit 4def1d805f
  1. 2
      src/layouts/header/index.vue
  2. 5
      src/pages/expSystem/backstage/index.vue
  3. 35
      src/pages/expSystem/backstage/model.vue
  4. 25
      src/pages/expSystem/backstage/modelType.vue
  5. 23
      src/pages/expSystem/backstage/sourceModel.vue
  6. 56
      src/pages/expSystem/backstage/sourceType.vue
  7. 156
      src/pages/match/add/index.vue
  8. 8
      src/pages/match/manage/matchRank.vue
  9. 5
      src/pages/station/preview/index.vue
  10. 2
      src/setting.js

@ -128,7 +128,7 @@ export default {
}).then(res => { }).then(res => {
this.notices = res.notificationList this.notices = res.notificationList
}).catch(res => { }); }).catch(res => { });
}, 1000) }, 5000)
} }
}, },
// //

@ -34,7 +34,7 @@ export default {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
active: this.$route.query.type || 'model', active: this.$route.query.type || 'model',
tabs: { tabs: {
model: "模型列表管理", model: "本校模型列表管理",
sourceModel: "源模型管理", sourceModel: "源模型管理",
compiler: '编译器管理' compiler: '编译器管理'
}, },
@ -72,7 +72,8 @@ export default {
...this.$route.query, ...this.$route.query,
page: 1, page: 1,
type: index, type: index,
categoryId: '' categoryId: '',
isSystem: 0
} }
}) })
}, },

@ -56,7 +56,7 @@
<el-table-column label="状态" <el-table-column label="状态"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isClose ? '禁用' : '启用' }} {{ scope.row.isOpen ? '禁用' : '启用' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
@ -96,14 +96,14 @@
node-key="id" node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}"> :props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree> </el-tree>
<el-tree v-if="systemModels.length" <!-- <el-tree v-if="systemModels.length"
:data="systemModels" :data="systemModels"
ref="systemModel" ref="systemModel"
default-expand-all default-expand-all
show-checkbox show-checkbox
node-key="id" node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}"> :props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree> </el-tree> -->
<div class="none" <div class="none"
v-else>暂无可导入的模型</div> v-else>暂无可导入的模型</div>
@ -162,7 +162,7 @@ export default {
this.isTopLevel = !curNode.level this.isTopLevel = !curNode.level
// //
if (this.isTopLevel) { if (this.isTopLevel) {
this.$post(this.api.teacherModelList, { this.$post(this.api.getAllModelList, {
founder: 1, founder: 1,
modelName: this.keyword, modelName: this.keyword,
pageNum: this.page, pageNum: this.page,
@ -212,6 +212,15 @@ export default {
if (this.isTopLevel) return this.$message.error('请选择子分类进入导入模型') if (this.isTopLevel) return this.$message.error('请选择子分类进入导入模型')
this.modelVisible = true this.modelVisible = true
this.modelLoading = true this.modelLoading = true
//
const res = await this.$post(this.api.getAllModelList, {
founder: 1,
pageNum: 1,
pageSize: 10000,
systemId: this.systemId,
isOpen: 0
})
const modelList = res.data.records
// //
// //
@ -236,8 +245,10 @@ export default {
const modelChildren = [] const modelChildren = []
// copyIdid // copyIdid
records.map(n => { records.map(n => {
if (!modelList.find(e => e.copyId === n.id)) {
n.categoryName = n.modelName n.categoryName = n.modelName
modelChildren.push(n) modelChildren.push(n)
}
}) })
// disabled // disabled
if (modelChildren.length) { if (modelChildren.length) {
@ -256,14 +267,14 @@ export default {
addType(data) addType(data)
// //
const res = await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`) // const res = await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`)
addType(res.data, 1) // addType(res.data, 1)
Promise.all(promises).then(_ => { Promise.all(promises).then(_ => {
data = this.handleType(data) data = this.handleType(data)
const systemData = this.handleType(res.data) // const systemData = this.handleType(res.data)
this.schoolModels = (data.length && data[0].children && data[0].children.length) ? data : [] this.schoolModels = (data.length && data[0].children && data[0].children.length) ? data : []
this.systemModels = (systemData.length && systemData[0].children && systemData[0].children.length) ? systemData : [] // this.systemModels = (systemData.length && systemData[0].children && systemData[0].children.length) ? systemData : []
this.modelLoading = false this.modelLoading = false
}).catch(res => { }) }).catch(res => { })
}, },
@ -281,7 +292,7 @@ export default {
// //
show (row) { show (row) {
this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1&model=1`) this.$router.push(`addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1&model=1&founder=1`)
}, },
// //
del (row) { del (row) {
@ -330,9 +341,9 @@ export default {
if (this.submiting) return false if (this.submiting) return false
const data = [] const data = []
const { systemId } = this const { systemId } = this
const { schoolModel, systemModel } = this.$refs const { schoolModel } = this.$refs
if (schoolModel || systemModel) { if (schoolModel) {
const list = [...schoolModel.getCheckedNodes(), ...systemModel.getCheckedNodes()] // const list = schoolModel.getCheckedNodes() //
const categoryId = this.$refs.tree.$refs.tree.getCurrentKey() // const categoryId = this.$refs.tree.$refs.tree.getCurrentKey() //
if (!list.length) return this.$message.error('请选择模型') if (!list.length) return this.$message.error('请选择模型')
this.submiting = true this.submiting = true

@ -13,6 +13,7 @@
icon="el-icon-refresh" icon="el-icon-refresh"
@click="syncModel">同步原始模型列表</el-button> @click="syncModel">同步原始模型列表</el-button>
<el-button v-auth="'/expSystem/list:进入:模型列表管理:新增分类'" <el-button v-auth="'/expSystem/list:进入:模型列表管理:新增分类'"
v-if="!orgList.length"
type="text" type="text"
@click="addType(0)">添加</el-button> @click="addType(0)">添加</el-button>
</div> </div>
@ -167,19 +168,19 @@ export default {
* 然后接口会返回全部这个分类的id然后把本校分类及模型全部加到全部这个分类下 * 然后接口会返回全部这个分类的id然后把本校分类及模型全部加到全部这个分类下
*/ */
const { id } = await this.$post(`${this.api.synchronizationMdelByOccupationlab}?systemId=${this.systemId}`) const { id } = await this.$post(`${this.api.synchronizationMdelByOccupationlab}?systemId=${this.systemId}`)
const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1') //
this.handleCatetory(data[0].children, id)
Promise.all(this.promises).then(() => {
this.getType() this.getType()
this.$router.push({ // const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1') //
path: 'backstage', // this.handleCatetory(data[0].children, id)
query: { // Promise.all(this.promises).then(() => {
...this.$route.query, // this.getType()
categoryId: '' // this.$router.push({
} // path: 'backstage',
}) // query: {
}).catch(e => { }) // ...this.$route.query,
// categoryId: ''
// }
// })
// }).catch(e => { })
}, },
// //
handleCatetory (list, parentId) { handleCatetory (list, parentId) {

@ -17,7 +17,8 @@
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
<div v-if="!isSystem"> <div>
<template v-if="!isSystem">
<el-button v-auth="'/expSystem/list:进入:源模型管理:新增模型'" <el-button v-auth="'/expSystem/list:进入:源模型管理:新增模型'"
type="primary" type="primary"
round round
@ -26,6 +27,7 @@
type="primary" type="primary"
round round
@click="batchDel">批量删除</el-button> @click="batchDel">批量删除</el-button>
</template>
<el-button v-auth="'/expSystem/list:进入:源模型管理:批量禁用'" <el-button v-auth="'/expSystem/list:进入:源模型管理:批量禁用'"
type="primary" type="primary"
round round
@ -161,7 +163,7 @@ export default {
methods: { methods: {
// //
async getList () { async getList () {
const curNode = this.$refs.tree.$refs[this.isSystem ? 'systemTree' : 'tree'].getCurrentNode() || {}// const curNode = this.$refs.tree.$refs.tree.getCurrentNode() || {}//
this.isTopLevel = !curNode.level this.isTopLevel = !curNode.level
let res let res
const data = { const data = {
@ -172,6 +174,7 @@ export default {
founder: 0 founder: 0
} }
if (curNode.level) data.categoryId = curNode.id if (curNode.level) data.categoryId = curNode.id
console.log("🚀 ~ file: sourceModel.vue:177 ~ getList ~ this.isSystem:", this.isSystem)
// //
if (this.isSystem) { if (this.isSystem) {
// //
@ -237,7 +240,7 @@ export default {
}, },
// //
show (row) { show (row) {
this.$router.push(`addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&show=1&founder=${this.isSystem ? 0 : 1}`) this.$router.push(`addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${!row.founder ? row.copyId : row.id}&show=1&founder=${row.founder}`)
}, },
// //
edit (row) { edit (row) {
@ -273,27 +276,33 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.$message.success(`${off ? '启用' : '禁用'}成功`) this.$message.success(`${off ? '启用' : '禁用'}成功`)
this.getData() this.getData()
}).catch(res => { }) }).catch(res => {
this.getList()
})
}).catch(() => { }) }).catch(() => { })
} else { } else {
this.$message.error("请先选择模型 !") this.$message.error("请先选择模型 !")
} }
}, },
// //
switchOff (val, row,) { switchOff (val, row) {
this.$post(this.api.disableModelDemo, [{ this.$post(this.api.disableModelDemo, [{
isOpen: val, isOpen: val,
modelId: row.id, modelId: row.id,
type: 1 type: 1
}]).then(res => { }]).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功') this.$message.success(val ? '禁用成功' : '启用成功')
}).catch(res => { }) }).catch(res => {
this.getList()
})
}, },
// //
switchOffSystem (val, row) { switchOffSystem (val, row) {
this.$post(this.api[val ? 'demoHiddenClose' : 'demoHiddenOpen'], [row.id]).then(res => { this.$post(this.api[val ? 'demoHiddenClose' : 'demoHiddenOpen'], [row.id]).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功') this.$message.success(val ? '禁用成功' : '启用成功')
}).catch(res => { }) }).catch(res => {
this.getList()
})
}, },
handleSelectionChange (val) { handleSelectionChange (val) {
this.multipleSelection = val this.multipleSelection = val

@ -1,6 +1,17 @@
<template> <template>
<div> <div>
<div> <div>
<el-radio-group v-model="modelType"
@change="changeModelType">
<div class="m-b-10">
<el-radio :label="0">本校模型</el-radio>
</div>
<div>
<el-radio :label="1">内置模型</el-radio>
</div>
</el-radio-group>
<el-divider></el-divider>
<el-tree :data="orgList" <el-tree :data="orgList"
ref="tree" ref="tree"
default-expand-all default-expand-all
@ -12,7 +23,7 @@
<span class="custom-tree-node" <span class="custom-tree-node"
slot-scope="{ node, data }"> slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span> <span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span> <span v-if="!modelType">
<el-button v-auth="'/expSystem/list:进入:源模型管理:编辑分类'" <el-button v-auth="'/expSystem/list:进入:源模型管理:编辑分类'"
v-if="node.level > 1" v-if="node.level > 1"
type="text" type="text"
@ -33,16 +44,6 @@
</span> </span>
</span> </span>
</el-tree> </el-tree>
<el-tree :data="orgListSystem"
default-expand-all
ref="systemTree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="nodeSystemClick"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree>
</div> </div>
<el-dialog :title="Form.id ? '编辑分类' : '新增分类'" <el-dialog :title="Form.id ? '编辑分类' : '新增分类'"
@ -75,6 +76,7 @@ export default {
data () { data () {
return { return {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
modelType: +this.$route.query.isSystem,
orgList: [], orgList: [],
orgListSystem: [], orgListSystem: [],
typeVisible: false, typeVisible: false,
@ -100,39 +102,49 @@ export default {
methods: { methods: {
async getType () { async getType () {
const { categoryId, isSystem } = this.$route.query const { categoryId, isSystem } = this.$route.query
// // /
const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1') const { data } = this.modelType ?
await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`) :
await this.$post(this.api.sourceModelClassification + '?founder=1')
this.orgList = data this.orgList = data
//
const res = await this.$post(`${this.api.builtInClassificationByNakadai}?systemId=${this.systemId}`)
this.orgListSystem = res.data
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[isSystem == 1 ? 'systemTree' : 'tree'].setCurrentKey(categoryId || data[0].id) this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs[isSystem == 1 ? 'systemTree' : 'tree'].getCurrentKey(), categoryId: this.$refs.tree.getCurrentKey(),
isSystem isSystem
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('initData', +isSystem) this.$emit('initData', +isSystem)
}) })
}, },
//
changeModelType (val) {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
categoryId: '',
isSystem: val
}
}).catch(err => { })
this.$parent.isSystem = val
this.getType()
},
// //
nodeClick () { nodeClick () {
this.$refs.systemTree.setCurrentKey(null)
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey(), categoryId: this.$refs.tree.getCurrentKey(),
isSystem: 0 isSystem: this.modelType
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('initData') this.$emit('initData', this.modelType)
}, },
// //
nodeSystemClick () { nodeSystemClick () {

@ -1,32 +1,52 @@
<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="hasPer"> <div v-if="hasPer">
<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-for="(item, i) in releaseTypes" :key="i" v-model="releaseType" :label="item.id">{{ item.name }}</el-radio> <el-radio v-for="(item, i) in releaseTypes"
:key="i"
v-model="releaseType"
:label="item.id">{{ item.name }}</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/list:管理:大赛详情:编辑'">编辑</el-button> <el-button v-if="!editing && id"
class="edit"
type="primary"
@click="editing = 1"
v-auth="'/match/list:管理:大赛详情:编辑'">编辑</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}]"> <ul :class="['steps', {pointer: !editing && id}]">
<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>
@ -38,23 +58,51 @@
</ul> </ul>
</el-card> </el-card>
</div> </div>
<el-button v-else-if="!editing && id" class="edit" type="primary" @click="editing = 1" v-auth="'/match/list:管理:大赛详情:编辑'">编辑</el-button> <el-button v-else-if="!editing && id"
class="edit"
type="primary"
@click="editing = 1"
v-auth="'/match/list:管理:大赛详情:编辑'">编辑</el-button>
<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">
<!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 --> <!-- 处于编辑状态(列表点编辑按钮进来默认是查看状态不可编辑点了编辑按钮才可编辑)或者新增才显示这几个按钮 -->
<div v-if="editing || !id" class="m-r-10"> <div v-if="editing || !id"
<el-button v-if="!publishStatus" @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button> class="m-r-10">
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev">上一步</el-button> <el-button v-if="!publishStatus"
<el-button v-if="releaseType == 0" type="primary" @click="save(1)">发布</el-button> @click="save(0)">保存{{ releaseType ? '草稿' : '' }}</el-button>
<el-button v-else type="primary" @click="save(id ? 1 : 0, 2)">保存并下一步</el-button> <el-button v-if="step === 2 || step === 3"
type="primary"
@click="prev">上一步</el-button>
<el-button v-if="releaseType == 0"
type="primary"
@click="save(1)">发布</el-button>
<el-button v-else
type="primary"
@click="save(id ? 1 : 0, 2)">保存并下一步</el-button>
</div> </div>
<el-button type="danger" @click="preview" v-auth="'/match/list:管理:大赛详情:预览'">预览</el-button> <el-button type="danger"
@click="preview"
v-auth="'/match/list:管理:大赛详情:预览'">预览</el-button>
<el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button> <el-button @click="cancel">{{ editing ? '取消' : '返回' }}</el-button>
</div> </div>
</div> </div>
@ -72,7 +120,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.match.cache, cache: this.$store.state.match.cache,
@ -107,26 +155,26 @@ export default {
step4 step4
}, },
// , // ,
beforeRouteLeave(to, from, next) { beforeRouteLeave (to, from, next) {
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
if(updateTime){ if (this.$refs['step' + this.step] && updateTime) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.save(this.step,to.path,next) this.save(this.step, to.path, next)
}).catch(() => { }).catch(() => {
next() next()
}) })
}else{ } else {
next() next()
} }
}, },
mounted() { mounted () {
this.getPer() this.getPer()
}, },
methods: { methods: {
// //
resumeData() { resumeData () {
if (this.cache) { if (this.cache) {
this.step = 3 this.step = 3
this.editing = true this.editing = true
@ -134,32 +182,32 @@ export default {
} }
}, },
// true // true
getPer() { getPer () {
this.$get(this.api.getCustomerOrder).then(({ show }) => { this.$get(this.api.getCustomerOrder).then(({ show }) => {
this.hasPer = show this.hasPer = show
show || this.$parent.hideArch() show || this.$parent.hideArch()
}).catch(err => {}) }).catch(err => { })
}, },
// 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,cb) { save (status, next = 0, cb) {
console.log('status=>',status) console.log('status=>', status)
console.log('cb=>',cb) console.log('cb=>', cb)
console.log('this.step=>',this.step) console.log('this.step=>', this.step)
this.$refs['step' + this.step].save(status, next, this.releaseType,cb) this.$refs['step' + this.step].save(status, next, this.releaseType, cb)
}, },
// //
prev() { prev () {
// //
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
if (updateTime) { if (this.$refs['step' + this.step] && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -172,10 +220,7 @@ export default {
} }
}, },
// //
next(next, setupId, competitionId,type) { next (next, setupId, competitionId, type) {
console.log('next==>',next)
console.log('setupId==>',setupId)
console.log('competitionId==>',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) {
@ -190,29 +235,29 @@ export default {
this.step-- this.step--
} else { } else {
console.log(99999999) console.log(99999999)
if(typeof setupId === 'function') { if (typeof setupId === 'function') {
setupId() setupId()
}else if(typeof type === 'function') { } else if (typeof type === 'function') {
type() type()
} }
} }
}, },
// //
toStep(i) { toStep (i) {
if (this.id && !this.editing) this.step = i if (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('/match/preview').href) window.open(this.$router.resolve('/match/preview').href)
}, },
// //
cancel() { cancel () {
// //
if (this.editing && this.$route.query.name) { if (this.editing && this.$route.query.name) {
// //
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
if (this.step < 4 && updateTime) { if (this.step < 4 && this.$refs['step' + this.step] && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -227,11 +272,10 @@ export default {
this.$router.push(`/match?page=${this.$store.state.match.page}`) this.$router.push(`/match?page=${this.$store.state.match.page}`)
} }
}, },
back() { back () {
// //
const { updateTime } = this.$refs['step' + this.step] const { updateTime } = this.$refs['step' + this.step]
console.log("🚀 ~ file: index.vue:142 ~ back ~ updateTime", updateTime) if (this.step < 4 && this.$refs['step' + this.step] && updateTime) {
if (this.step < 4 && updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -243,7 +287,7 @@ export default {
this.backPage() this.backPage()
} }
}, },
backPage() { backPage () {
this.$router.push(`/match?page=${this.$store.state.match.page}`) this.$router.push(`/match?page=${this.$store.state.match.page}`)
} }
} }
@ -305,10 +349,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 {

@ -617,11 +617,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.publishTime = '' this.publishTime = ''
this.sourceType = '' this.sourceType = ''
this.type = 0 this.type = 0

@ -585,7 +585,7 @@ export default {
const section = this.section === undefined ? 0 : +this.section const section = this.section === undefined ? 0 : +this.section
const clist = this.chapterList[chapter] const clist = this.chapterList[chapter]
if (this.chapterList.length && clist.subsectionList && clist.subsectionList.length && !this.commentId) { if (this.chapterList.length && clist.subsectionList && clist.subsectionList.length && !this.commentId) {
// this.preview(clist.subsectionList[section], clist.name, 1); this.preview(clist.subsectionList[section], clist.name, 1);
} }
}, },
// //
@ -728,7 +728,8 @@ export default {
// pid: reply ? reply.commentId : row ? row.commentId : 0, // pid: reply ? reply.commentId : row ? row.commentId : 0,
pid: row ? row.commentId : 0, pid: row ? row.commentId : 0,
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '', replyAccountId: reply ? reply.createAccountId : row.createAccountId || '',
status: row ? 2 : 1 status: row ? 2 : 1,
replyCommentId: reply ? reply.commentId : row ? row.commentId : ''
}).then(res => { }).then(res => {
this.comment = '' this.comment = ''
this.curReplyId = row ? row.commentId : '' this.curReplyId = row ? row.commentId : ''

@ -27,7 +27,7 @@ if (isPro) {
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.152:9000/"; // 榕 host = "http://192.168.31.152:9000/"; // 榕
// host = 'http://192.168.31.53:9000/'; // 赓 // host = 'http://192.168.31.51:9000/'; // 赓
} }
const Setting = { const Setting = {

Loading…
Cancel
Save