赛事范围

dev_202207
yujialong 2 years ago
parent 6dc95d79d1
commit 010ce30364
  1. 46
      src/views/match/add/index.vue
  2. 2
      src/views/match/manage/noticeDetail.vue

@ -145,14 +145,26 @@
<el-dialog title="请勾选院校" :visible.sync="rangeVisible" width="580px" custom-class="range-dia" :close-on-click-modal="false"> <el-dialog title="请勾选院校" :visible.sync="rangeVisible" width="580px" custom-class="range-dia" :close-on-click-modal="false">
<el-cascader <el-cascader
ref="range" ref="range"
key="range"
v-model="range" v-model="range"
:props="props" :props="props"
:show-all-levels="false" :show-all-levels="false"
clearable clearable
filterable filterable
:before-filter="beforeFilter" :before-filter="beforeFilter"
@visible-change="rangeViChange"
:options="rangeList" :options="rangeList"
@change="rangeChange"
@input.native="rangeSearch"></el-cascader> @input.native="rangeSearch"></el-cascader>
<div class="range-check">
<el-tag
v-for="tag in rangeChecked"
:key="tag.value"
closable>
{{tag.label}}
</el-tag>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="rangeVisible = false"> </el-button> <el-button size="small" @click="rangeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button> <el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
@ -208,6 +220,7 @@ export default {
range: [], range: [],
rangeInit: [], rangeInit: [],
rangeName: '', rangeName: '',
rangeChecked: [],
// //
props: { props: {
multiple: true, multiple: true,
@ -366,6 +379,26 @@ export default {
showRange() { showRange() {
this.rangeVisible = true this.rangeVisible = true
}, },
rangeViChange(boolean){
console.log(33, this.$refs.range.$refs.panel)
//true false
if(boolean){
this.$refs.range.$refs.panel.activePath=[];
// this.getCascader("region", null);
}
},
rangeChange(val, e) {
console.log("🚀 ~ file: index.vue ~ line 388 ~ rangeChange ~ val", val, this.$refs.range.getCheckedNodes())
const checked = this.$refs.range.getCheckedNodes()
const name = []
checked.map(e => {
name.push({
value: e.value,
label: e.label
})
})
this.rangeChecked = name
},
// //
getSchool() { getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => { this.$get(this.api.querySchoolData).then(({ list }) => {
@ -386,11 +419,14 @@ export default {
}, },
// //
rangeSearch(el) { rangeSearch(el) {
const val = el.target.value
if (!val) return false
clearTimeout(this.rangeTimer) clearTimeout(this.rangeTimer)
this.rangeTimer = setTimeout(() => { this.rangeTimer = setTimeout(() => {
const val = el.target.value // this.$refs.range.$refs.panel.activePath = []
let result = this.schools.filter(e => e.label.includes(val)) // let result = this.schools.filter(e => e.label.includes(val)) //
this.rangeList = val ? result : [] console.log("🚀 ~ file: index.vue ~ line 428 ~ this.rangeTimer=setTimeout ~ result",this.schools.filter(e => e.label.includes(val)), this.schools)
this.rangeList = result
}, 500) }, 500)
}, },
// //
@ -700,4 +736,10 @@ $upload-lg-height: 150px;
font-weight: bold; font-weight: bold;
} }
} }
.range-check {
margin-top: 10px;
.el-tag {
margin-right: 10px;
}
}
</style> </style>

@ -140,7 +140,7 @@ export default {
fileName: this.fileName, fileName: this.fileName,
filePath: file.fileUrl || file.fileId filePath: file.fileUrl || file.fileId
} }
this.form.contestAnnexList.push(data) this.form.announcementAnnexList.push(data)
// //
id && this.$post(this.api.saveAnnouncementAnnex, data).then(res => {}).catch(res => {}) id && this.$post(this.api.saveAnnouncementAnnex, data).then(res => {}).catch(res => {})
}, },

Loading…
Cancel
Save