This commit is contained in:
宋伟佳
2022-06-06 15:20:28 +08:00
parent c9bc703a40
commit ec05a64761
+482 -14
View File
@@ -277,10 +277,11 @@
<el-tabs
class="question-tabs"
type="border-card"
@tab-click="sourceClick"
v-model="activeType"
@tab-click="sourceClick2"
style="height: 100%"
tab-position="left">
<el-tab-pane label="国内标准">
<el-tab-pane name="INLAND" label="国内标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
@@ -291,7 +292,7 @@
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick"
@tab-click="standClick2"
style="height: 100%"
tab-position="left"
>
@@ -340,17 +341,427 @@
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane label="海外标准">
<el-tab-pane name="FOREIGN" label="海外标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick2"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activeQue"
style="height: 100%"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
<div class="info-answer" >
<answer-item></answer-item>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane label="企业标准">
<el-tab-pane name="BUSINESS_STAND" label="企业标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick2"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activeQue"
style="height: 100%"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
<div class="info-answer" >
<answer-item></answer-item>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane label="公共问题">
<el-tab-pane name="OTHER" label="公共问题">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick2"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activeQue"
style="height: 100%"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
<div class="info-answer" >
<answer-item></answer-item>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane name="mySub" label="我的订阅">
<div>
<div style="height: 100%">
<el-tabs
class="question-tabs"
type="border-card"
v-model="activeType"
@tab-click="sourceClick3"
style="height: 100%"
tab-position="left">
<el-tab-pane name="INLAND" label="国内标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick3"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
style="height: 100%"
v-model="activeQue"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane name="FOREIGN" label="海外标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick3"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
style="height: 100%"
v-model="activeQue"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane name="BUSINESS_STAND" label="企业标准">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick3"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
style="height: 100%"
v-model="activeQue"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
<el-tab-pane name="OTHER" label="公共问题">
<div v-if="!standList || standList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
v-model="activestand"
@tab-click="standClick3"
style="height: 100%"
tab-position="left"
>
<template v-for="stand in standList">
<el-tab-pane class="com-box" :name="stand.standardId">
<template slot="label">
<stand-item :stand="stand"></stand-item>
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
class="question-box"
type="border-card"
style="height: 100%"
v-model="activeQue"
@tab-click="questionClick"
tab-position="left"
>
<template v-for="question in questionsList">
<el-tab-pane class="com-box" :name="question.id">
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
<question-item-info :answer="item"></question-item-info>
</div>
</div>
</template>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-tab-pane>
</el-tabs>
@@ -1033,17 +1444,61 @@ export default {
this.questionForm.classification = this.standType
},
handleClick(){
console.log(this.activeName);
this.ansSearch()
this.standList = []
switch (this.activeName) {
case 'myQue':
this.standSearch() // 查询提问标准
break
case 'myAns':
this.ansSearch() //查询回答标准
break
case 'mySub':
this.subSearch() //查询订阅标准
break
}
},
sourceClick(){
this.questionSerach.classification = this.activeType
this.questionSerach.standardEncdoing = ''
this.standSearch()
},
sourceClick2(){
this.questionSerach.classification = this.activeType
this.ansSearch()
},
//我的订阅
sourceClick3(){
this.questionSerach.classification = this.activeType
this.subSearch()
},
standClick(){
this.queSearch()
},
standClick2(){
this.$http.get('lawss/AskQuestions/getAskQuestionsByStandardId',{
standardId: this.activestand,
answerer: this.$store.getters.userInfo.userId,
},{
_this: this
}, res => {
this.questionsList = res.data
}, e =>{
})
},
standClick3(){
this.$http.get('lawss/AskQuestions/getAskQuestionsByStandardId',{
standardId: this.activestand,
answerer: this.$store.getters.userInfo.userId,
},{
_this: this
}, res => {
this.questionsList = res.data
}, e =>{
})
},
questionClick(){
sessionStorage.setItem('queId', this.activeQue)
this.$http.get('lawss/AskQuestions/getAskQuestionsByakId',{
@@ -1070,25 +1525,38 @@ export default {
queSearch(){
this.$http.get('lawss/AskQuestions/getAskQuestionsByStandardId',{
standardId: this.activestand,
answerer: this.$store.getters.userInfo.userId,
},{
_this: this
}, res => {
this.questionsList = res.data
console.log(this.questionsList);
})
},
//回答查询
//查询回答标准
ansSearch(){
this.$http.get('lawss/AskQuestions/getReplyDetails',{
classification: this.questionSerach.classification,
classification: this.activeType,
answerer: this.$store.getters.userInfo.userId,
}, {
_this: this,
}, res => {
this.standList = res.data
})
},
//查询标准
//查询订阅标准
subSearch(){
this.$http.get('lawss/AskQuestions/getAskQuestionsBySubscription',{
classification: this.activeType,
answerer: this.$store.getters.userInfo.userId,
},{
_this: this
}, res => {
this.standList = res.data
}, e =>{
})
},
//查询提问标准
standSearch(){
this.$http.get('lawss/AskQuestions/getAskQuestionsDetails',{ ...this.questionSerach },{
_this: this