From 4dd23381458820161c7034a442878fa59072378d Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Mon, 21 Nov 2022 16:59:52 +0800 Subject: [PATCH] up --- components/jp-select/jp-select/jp-select.vue | 10 ++-- .../zhilin-cascader/zhilin-cascader.vue | 11 +++-- inspect/inspect.vue | 46 ++++++++++++++----- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/components/jp-select/jp-select/jp-select.vue b/components/jp-select/jp-select/jp-select.vue index 365b92c..d728a1b 100644 --- a/components/jp-select/jp-select/jp-select.vue +++ b/components/jp-select/jp-select/jp-select.vue @@ -23,9 +23,9 @@ - + - {{items[name]||items}}({{items['score']+'分'||''}}) + {{items[name]||items}}({{items['score']+'分'||''}}) @@ -106,7 +106,8 @@ item1: '' || {} || [], style: {}, textStyle: {}, - xzindex: -1 + xzindex: -1, + viewId:"" } }, mounted() { @@ -140,7 +141,8 @@ } }, toOpen() { - this.item1 = JSON.parse(JSON.stringify(this.item)) + this.item1 = JSON.parse(JSON.stringify(this.item)) + this.viewId = 'to'+this.item1.id this.type = true this.selectType = true }, diff --git a/components/zhilin-cascader/zhilin-cascader.vue b/components/zhilin-cascader/zhilin-cascader.vue index ef93e72..5994a36 100644 --- a/components/zhilin-cascader/zhilin-cascader.vue +++ b/components/zhilin-cascader/zhilin-cascader.vue @@ -67,7 +67,8 @@ values: [], valuesCopy:[], titles: this.title, - wrapperHeight: 0 + wrapperHeight: 0, + clickItem:null } }, watch: { @@ -118,8 +119,7 @@ this.valuesCopy[wrapIdx] = this.wrapContent[wrapIdx][i][this.labelKey] this.values[wrapIdx] = this.wrapContent[wrapIdx][i][this.valueKey] - - // this.titles = this.wrapContent[wrapIdx][i].name + this.clickItem = this.wrapContent[wrapIdx][i] this.values = this.values.slice(0, wrapIdx + 1) this.valuesCopy = this.valuesCopy.slice(0, wrapIdx + 1) let children = this.wrapContent[wrapIdx][i][this.childrenKey] @@ -145,7 +145,7 @@ if (this.values.length && this.values.length != this.wrapContent.length) return console.log('未选择完整') } this.$emit('input', false) - this.$emit('confirm', this.values,this.valuesCopy) + this.$emit('confirm', this.values,this.valuesCopy,this.clickItem) }, reset() { this.titles = "请选择" @@ -153,7 +153,8 @@ this.values = [] this.valuesCopy = [] this.wrapContent = [this.wrapContent[0]] - } + } + this.$emit("reset") }, popupChange(e) { this.$emit('input', e.show) diff --git a/inspect/inspect.vue b/inspect/inspect.vue index abcd48b..e5d7c06 100644 --- a/inspect/inspect.vue +++ b/inspect/inspect.vue @@ -24,10 +24,10 @@ + @confirm="confirmAsk" @reset="resetAsk"> - + --> - + @@ -96,10 +96,12 @@ areaList: [], riverShow: false, riverName: "", - riverList: [], + riverList: [], + showScore:false, decShow: false, decName: "", - decList: [], + decList: [], + decItem:'', askShow: false, askName: "", askList: [], @@ -226,11 +228,28 @@ } }); }, - confirmAsk(val, copy) { + confirmAsk(val, copy,item) { + if(item.is_check==1){ + this.showScore = true + }else{ + this.showScore = false + this.decName = '' + this.form.dec_score = '' + this.form.deal_examine_id = '' + } this.form.ask_type_id_top_pid = val[0] this.form.ask_type_id = val[val.length - 1] this.askName = copy.join("/") console.log(this.form.ask_type_id, this.askName) + }, + resetAsk(){ + this.form.ask_type_id_top_pid = "" + this.form.ask_type_id = "" + this.askName = "" + this.showScore = false + this.decName = '' + this.form.dec_score = '' + this.form.deal_examine_id = '' }, // 扣分条款 loadDec() { @@ -256,14 +275,15 @@ }); }, confirmDec(val) { - console.log('dec', val) this.decName = val.score this.form.dec_score = val.score - this.form.deal_examine_id = val.id - }, - checked(el) { - this.item = el + this.form.deal_examine_id = val.id + this.decItem = val + console.log(this.decItem) }, + // checked(el) { + // this.item = el + // }, toOpen() { this.$refs.jpSelect.toOpen() }, @@ -343,7 +363,9 @@ }) } } - this.form.inspection_file_list = pic + this.form.inspection_file_list = pic + console.log(this.form.deal_examine_id) + return this.$refs.uForm.validate(valid => { if (valid) { that.util.request({