Merge branch 'dev_2022-06-14' into dev_202207

dev_202207
yujialong 2 years ago
commit 6e51e62b36
  1. 54
      src/views/match/add/index.vue

@ -135,8 +135,8 @@
</el-form-item>
<el-form-item>
<el-button v-if="!form.id" @click="save(0)">保存</el-button>
<el-button type="primary" @click="save(1)" v-auth="'/match:管理:大赛详情:发布'">发布</el-button>
<el-button type="danger" @click="preview" v-auth="'/match:管理:大赛详情:预览'">预览</el-button>
<el-button type="primary" @click="save(1)">发布</el-button>
<el-button type="danger" @click="preview">预览</el-button>
</el-form-item>
</el-form>
</div>
@ -149,10 +149,7 @@
:props="props"
:show-all-levels="false"
clearable
filterable
:before-filter="beforeFilter"
:options="rangeList"
@input.native="rangeSearch"></el-cascader>
filterable></el-cascader>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="rangeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
@ -214,13 +211,9 @@ export default {
checkStrictly: true,
lazy: true,
lazyLoad (node, resolve) {
//
const input = document.querySelector('.el-cascader__search-input')
console.log("🚀 ~ file: index.vue ~ line 219 ~ lazyLoad ~ input", input, node)
if (input && input.value) return resolve([])
const { level, value } = node
// console.log("🚀 ~ file: index.vue ~ line 221 ~ lazyLoad ~ level", node)
//
console.log('lazy', node, that.range)
if (!level) {
that.$get(that.api.queryProvince).then(({ list }) => {
const data = []
@ -272,9 +265,6 @@ export default {
},
submiting: false,
updateTime: 0,
rangeTimer: null,
schools: [],
rangeList: []
};
},
components: {
@ -311,7 +301,6 @@ export default {
},
mounted() {
this.getData()
this.getSchool()
},
methods: {
getData() {
@ -347,6 +336,7 @@ export default {
range.push(item)
})
this.range = range
console.log("🚀 ~ file: matchDetail.vue ~ line 327 ~ this.$post ~ this.range", this.range)
}
// name
@ -364,33 +354,13 @@ export default {
//
showRange() {
this.rangeVisible = true
console.log("🚀 ~ file: index.vue ~ line 384 ~ showRange ~ rangeVisible", this.range)
// this.range = this.rangeInit
},
//
getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => {
const result = []
list.map(e => {
result.push({
value: e.schoolId,
label: e.schoolName,
leaf: true
})
})
this.schools = result
}).catch(res => {})
},
//
beforeFilter() {
return false
},
//
rangeSearch(el) {
clearTimeout(this.rangeTimer)
this.rangeTimer = setTimeout(() => {
const val = el.target.value
let result = this.schools.filter(e => e.label.includes(val)) //
this.rangeList = val ? result : []
}, 500)
//
rangeFilter(node, keyword) {
console.log("🚀 ~ file: index.vue ~ line 363 ~ rangeFilter ~ node, keyword", node, keyword)
},
//
rangeSubmit() {
@ -439,7 +409,7 @@ export default {
const data = {
contestId: id || '',
fileName: this.fileName,
filePath: file.fileUrl
filePath: file.fileUrl || file.fileId
}
this.form.contestAnnexList.push(data)
//

Loading…
Cancel
Save