fixLog
yujialong 2 years ago
parent 3e17c1b5bd
commit 2dd6c79475
  1. 44
      src/views/match/manage/matchRank.vue
  2. 4
      src/views/order/AddOrder.vue
  3. 6
      src/views/serve/addModel.vue
  4. 2
      src/views/serve/backstage/sourceModel.vue
  5. 26
      src/views/serve/backstage/sourceType.vue

@ -311,7 +311,8 @@ export default {
let second = data.getSeconds(); let second = data.getSeconds();
return [`${hour}:${minute}:${second} - 23:59:59`] return [`${hour}:${minute}:${second} - 23:59:59`]
})(), })(),
} },
uploaded: 0
}; };
}, },
mounted () { mounted () {
@ -320,35 +321,6 @@ export default {
methods: { methods: {
// //
getData () { getData () {
//
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// }).catch(res => {})
// this.published = whetherToPublish
// this.getRank(whetherToPublish)
// }).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish ?
// this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// this.getRank(whetherToPublish)
// }).catch(res => {}) :
// this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
this.sourceType = source this.sourceType = source
this.type = source == 1 ? 1 : 0 this.type = source == 1 ? 1 : 0
@ -605,6 +577,10 @@ export default {
this.published = true this.published = true
this.timeId = res.releaseTime.id this.timeId = res.releaseTime.id
this.publishTime = res.releaseTime.releaseTime this.publishTime = res.releaseTime.releaseTime
} else {
this.published = false
this.timeId = ''
this.publishTime = ''
} }
}, },
// //
@ -618,6 +594,7 @@ export default {
}) })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData() this.getData()
this.uploaded = 0
this.publishVisible = false this.publishVisible = false
}, },
// //
@ -631,8 +608,13 @@ export default {
// //
// //
if (publish) { if (publish) {
//
if (this.type && !this.uploaded) {
return util.errorMsg('请先上传数据!')
} else {
this.publishTime = new Date() this.publishTime = new Date()
this.publishVisible = true this.publishVisible = true
}
} else { } else {
try { try {
// //
@ -675,6 +657,7 @@ export default {
}, },
uploadSuccess (res, file, fileList) { uploadSuccess (res, file, fileList) {
this.uploadFaild = false this.uploadFaild = false
this.uploaded = 0
if (res.status === 200) { if (res.status === 200) {
const { exportCode } = res.data const { exportCode } = res.data
if (exportCode) { if (exportCode) {
@ -682,6 +665,7 @@ export default {
this.uploadFaild = true this.uploadFaild = true
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`)
} else { } else {
this.uploaded = 1
this.importVisible = false this.importVisible = false
this.getRank() this.getRank()
util.successMsg('请检查数据后,点击发布排名以发布数据!') util.successMsg('请检查数据后,点击发布排名以发布数据!')

@ -1682,7 +1682,7 @@
trigger="click"> trigger="click">
<div class="cursor" <div class="cursor"
v-html="shipInfo" v-html="shipInfo"
title="点击复制到文本框" :title="viewDisabled ? '' : '点击复制到文本框'"
@click="copyLink"></div> @click="copyLink"></div>
<el-button type="text" <el-button type="text"
slot="reference">产品链接</el-button> slot="reference">产品链接</el-button>
@ -2854,7 +2854,7 @@ export default {
this.shipVisible = true this.shipVisible = true
}, },
copyLink () { copyLink () {
this.shipContent += this.shipInfo if (!this.viewDisabled) this.shipContent += this.shipInfo
}, },
// //
submitShip () { submitShip () {

@ -40,7 +40,8 @@
<el-cascader :options="categoryList" <el-cascader :options="categoryList"
v-model="categoryIdCus" v-model="categoryIdCus"
:props="categoryProps" :props="categoryProps"
clearable> clearable
:disabled="isSchool">
</el-cascader> </el-cascader>
</div> </div>
<div class="item code"> <div class="item code">
@ -63,6 +64,7 @@ export default {
categoryId: Number(this.$route.query.categoryId), categoryId: Number(this.$route.query.categoryId),
id: Number(this.$route.query.id), id: Number(this.$route.query.id),
postStatus: Number(this.$route.query.postStatus), postStatus: Number(this.$route.query.postStatus),
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), //
categoryIdCus: [], categoryIdCus: [],
@ -159,7 +161,7 @@ export default {
modelName, modelName,
modelDemo, modelDemo,
postStatus, postStatus,
founder: 0 founder: this.isSchool ? 1 : 0
} }
if (id) { if (id) {
data.id = id data.id = id

@ -246,7 +246,7 @@ export default {
}, },
// //
edit (row) { edit (row) {
this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&postStatus=${row.postStatus}`) this.$router.push(`/addModel?categoryId=${this.$refs.tree.$refs.tree.getCurrentKey()}&id=${row.id}&postStatus=${row.postStatus}&isSchool=${this.isSchool}`)
}, },
// //
copy (row) { copy (row) {

@ -3,6 +3,7 @@
<div> <div>
<el-tree :data="orgList" <el-tree :data="orgList"
ref="tree" ref="tree"
default-expand-all
node-key="id" node-key="id"
highlight-current highlight-current
:expand-on-click-node="false" :expand-on-click-node="false"
@ -84,21 +85,25 @@ export default {
methods: { methods: {
// //
getType () { getType () {
this.$post(this.api.sourceModelClassification + '?founder=0').then(res => { this.$post(this.api.sourceModelClassification + '?founder=0').then(({ data }) => {
const { data } = res
this.orgList = data this.orgList = data
this.$parent.categories = data this.$parent.categories = data
data.length && this.$nextTick(() => { data.length && this.$nextTick(() => {
const categoryId = this.$route.query.categoryId const { categoryId, school } = this.$route.query
if (school == 1) {
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({
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey() categoryId: this.$refs.tree.getCurrentKey(),
school
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('getData') this.$emit('initData', +school)
}) })
}).catch(res => { }) }).catch(res => { })
}, },
@ -109,7 +114,8 @@ export default {
path: 'backstage', path: 'backstage',
query: { query: {
...this.$route.query, ...this.$route.query,
categoryId: this.$refs.tree.getCurrentKey() categoryId: this.$refs.tree.getCurrentKey(),
school: 0
} }
}).catch(err => { }) }).catch(err => { })
this.$emit('initData') this.$emit('initData')
@ -118,6 +124,13 @@ export default {
schoolClick () { schoolClick () {
this.$refs.tree.setCurrentKey(null) this.$refs.tree.setCurrentKey(null)
this.schoolActive = true this.schoolActive = true
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
school: 1
}
}).catch(err => { })
this.$emit('initData', 1) this.$emit('initData', 1)
}, },
// //
@ -190,6 +203,7 @@ export default {
padding: 3px 5px 3px 23px; padding: 3px 5px 3px 23px;
margin-top: 5px; margin-top: 5px;
font-size: 14px; font-size: 14px;
color: #606266;
cursor: pointer; cursor: pointer;
&.active { &.active {
background-color: #f0f7ff; background-color: #f0f7ff;

Loading…
Cancel
Save