修改 问题库
This commit is contained in:
@@ -3,6 +3,16 @@
|
||||
<div id="my-questions">
|
||||
<div class="search-area">
|
||||
<el-form :inline="true" :model="questionSerach" >
|
||||
<el-form-item class="el-form-item search-item" label="标准">
|
||||
<el-select v-model="questionSerach.classification">
|
||||
<el-option
|
||||
v-for="opt in classificationOption"
|
||||
:key="opt.value"
|
||||
:value="opt.value"
|
||||
:label="opt.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="el-form-item search-item" label="标准号">
|
||||
<el-input v-model="questionSerach.standardEncdoing" placeholder="根据标准号查询"></el-input>
|
||||
</el-form-item>
|
||||
@@ -24,243 +34,46 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="tab-box">
|
||||
<el-tabs
|
||||
type="border-card"
|
||||
style="height: 100%"
|
||||
class="type-tabs"
|
||||
v-model="activeName"
|
||||
@tab-click="sourceClick"
|
||||
tab-position="left"
|
||||
|
||||
<el-table
|
||||
ref="selections"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%; flex: auto;"
|
||||
class="drag-table"
|
||||
height="92%"
|
||||
border
|
||||
:loading="tableLoading"
|
||||
:data="tableData"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
>
|
||||
<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="standClick"
|
||||
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 class="contentClass">
|
||||
<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="standClick"
|
||||
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 class="contentClass">
|
||||
<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="standClick"
|
||||
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 class="contentClass">
|
||||
<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="standClick"
|
||||
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 class="contentClass">
|
||||
<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>
|
||||
<el-table-column show-overflow-tooltip label="分类" prop="classification" align="center" min-width="50" :formatter="formatClassification"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="标准号/问题分类" width="150" align="center" prop="standardEncdoing"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="标准名称" prop="standardName" align="center" min-width="100"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="问题描述" prop="problemDescription" align="center" min-width="300"></el-table-column>
|
||||
<el-table-column prop="questionTime" width="150" align="center" label="提问日期"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<div @click.stop style="display: inline-block">
|
||||
<el-dropdown trigger="click" @command="handleCommand2">
|
||||
<i class="iconfont"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>
|
||||
<el-dropdown-item :command="[scope.row, '订阅']">订阅</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<pagination
|
||||
v-show="this.tableLoading === false"
|
||||
style="position: relative;"
|
||||
:page="questionSerach.page"
|
||||
:total="tableTotal"
|
||||
@pageChange="handleSelectPageChange"
|
||||
@pageSizeChange="handleSelectPageSizeChange"></pagination>
|
||||
</div>
|
||||
<!--提问弹窗 -->
|
||||
<el-dialog
|
||||
@@ -687,6 +500,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!-- 详情抽屉-->
|
||||
<el-drawer
|
||||
class="drawer-table"
|
||||
title="查看问题"
|
||||
:wrapperClosable="false"
|
||||
:visible.sync="answerListDrawer"
|
||||
size="900px"
|
||||
custom-class="demo-drawer"
|
||||
>
|
||||
<div class="demo-drawer-content">
|
||||
<!-- <loading :loading="lawInfoTableLoading">数据获取中</loading>-->
|
||||
<div style="height: 90%;overflow-y: auto;">
|
||||
<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 slot="footer" class="demo-drawer-footer">
|
||||
<el-button class="common-button-default" size="mini" @click="answerListDrawer = false">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -766,13 +604,37 @@ export default {
|
||||
{required: true, message: '请输入问题', trigger: 'blur'},
|
||||
],
|
||||
},
|
||||
classificationOption: [
|
||||
{
|
||||
value: 'INLAND',
|
||||
label: '国内标准'
|
||||
},
|
||||
{
|
||||
value: 'FOREIGN',
|
||||
label: '海外标准'
|
||||
},
|
||||
{
|
||||
value: 'BUSINESS_STAND',
|
||||
label: '企业标准'
|
||||
},
|
||||
{
|
||||
value: 'OTHER',
|
||||
label: '公共问题'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableTotal: 0,
|
||||
questionSerach:{
|
||||
classification: 'INLAND',
|
||||
standardName: '', //标准名称
|
||||
standardEncdoing: '', //标准编号
|
||||
problemDescription: '', //关键词/问题描述
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
},
|
||||
answerList: [],
|
||||
answerListDrawer: false,
|
||||
answer: '',
|
||||
standList: [],
|
||||
standIdList: [],
|
||||
@@ -781,33 +643,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
if(this.$route.query.queId){
|
||||
this.questionSerach.standardName = this.$route.query.standName
|
||||
this.questionSerach.classification = this.$route.query.standType
|
||||
this.activeName = this.$route.query.standType
|
||||
this.standSearch()
|
||||
}else{
|
||||
switch (this.standType){
|
||||
case 'INLAND':
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'FOREIGN':
|
||||
this.activeName = 'FOREIGN'
|
||||
this.questionSerach.classification = 'FOREIGN'
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'BUSINESS_STAND':
|
||||
this.activeName = 'BUSINESS_STAND'
|
||||
this.questionSerach.classification = 'BUSINESS_STAND'
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'OTHER':
|
||||
this.activeName = 'OTHER'
|
||||
this.questionSerach.classification = 'OTHER'
|
||||
this.standSearch2()
|
||||
break
|
||||
}
|
||||
}
|
||||
this.questionSerach.standardName = this.$route.query.standName
|
||||
this.questionSerach.classification = this.$route.query.standType
|
||||
this.searchBtn()
|
||||
// 查询各下拉框数据
|
||||
this.$http.get("sys/dictype/getDicTypeListCode", "", {
|
||||
_this: this,
|
||||
@@ -820,6 +658,34 @@ export default {
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
formatClassification(e){
|
||||
for (let i=0; i<this.classificationOption.length; i++){
|
||||
if(e.classification === this.classificationOption[i].value){
|
||||
return this.classificationOption[i].label
|
||||
}
|
||||
}
|
||||
},
|
||||
// 展示区域 更多
|
||||
handleCommand2 (command) {
|
||||
switch (command[1]) {
|
||||
case '查看':
|
||||
this.handleDetail(command[0])
|
||||
break
|
||||
}
|
||||
},
|
||||
handleDetail(row){
|
||||
console.log('row = ', row)
|
||||
this.$http.get('lawss/AskQuestions/getAskQuestionsByakId',{
|
||||
id: row.id,
|
||||
state: 'yes'
|
||||
},{
|
||||
_this: this
|
||||
}, res => {
|
||||
this.answerListDrawer = true
|
||||
this.answerList = res.data
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
refreshStandMap(){
|
||||
this.standMap = new Map()
|
||||
this.standList.forEach(item=>{
|
||||
@@ -1029,9 +895,6 @@ export default {
|
||||
this.questionSerach.standardEncdoing = ''
|
||||
this.standSearch()
|
||||
},
|
||||
standClick(){
|
||||
this.queSearch()
|
||||
},
|
||||
questionClick(){
|
||||
sessionStorage.setItem('queId', this.activeQue)
|
||||
this.$http.get('lawss/AskQuestions/getAskQuestionsByakId',{
|
||||
@@ -1087,18 +950,19 @@ export default {
|
||||
questioner: this.$store.getters.userInfo.userId, //提问人
|
||||
problemDescription: '', //关键词/问题描述
|
||||
}
|
||||
this.standSearch2()
|
||||
this.searchBtn()
|
||||
},
|
||||
searchBtn(){
|
||||
this.questionSerach.classification = this.activeType
|
||||
this.questionSerach.questioner = ''
|
||||
this.$http.get('lawss/AskQuestions/retrieve',{
|
||||
this.tableLoading = true
|
||||
this.$http.postData('lawss/AskQuestions/list',{
|
||||
...this.questionSerach
|
||||
},{
|
||||
_this: this
|
||||
}, res => {
|
||||
this.standList = res.data
|
||||
this.refreshStandMap()
|
||||
this.tableData = res.data.records
|
||||
this.tableTotal = res.total
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
//问题查询
|
||||
@@ -1113,31 +977,7 @@ export default {
|
||||
this.questionsList = res.data
|
||||
})
|
||||
},
|
||||
//回答查询
|
||||
ansSearch(){
|
||||
this.$http.get('lawss/AskQuestions/getReplyDetails',{
|
||||
classification: this.questionSerach.classification,
|
||||
answerer: this.$store.getters.userInfo.userId,
|
||||
}, {
|
||||
_this: this,
|
||||
}, res => {
|
||||
|
||||
})
|
||||
},
|
||||
//查询提问标准
|
||||
standSearch(){
|
||||
this.$http.get('lawss/AskQuestions/getAskQuestionsDetails',{ ...this.questionSerach },{
|
||||
_this: this
|
||||
}, res =>{
|
||||
this.standList = res.data
|
||||
this.refreshStandMap()
|
||||
if(this.$route.query.queId){
|
||||
this.activestand = this.standList[0].standardId
|
||||
this.queSearch()
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
standSearch2(){
|
||||
let qId = this.$route.query.standId
|
||||
let queNumber = 0
|
||||
@@ -1240,27 +1080,7 @@ export default {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.dialogVisible = false
|
||||
switch (this.standType){
|
||||
case 'INLAND':
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'FOREIGN':
|
||||
this.activeName = 'FOREIGN'
|
||||
this.questionSerach.classification = 'FOREIGN'
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'BUSINESS_STAND':
|
||||
this.activeName = 'BUSINESS_STAND'
|
||||
this.questionSerach.classification = 'BUSINESS_STAND'
|
||||
this.standSearch2()
|
||||
break
|
||||
case 'OTHER':
|
||||
this.activeName = 'OTHER'
|
||||
this.questionSerach.classification = 'OTHER'
|
||||
this.standSearch2()
|
||||
break
|
||||
}
|
||||
this.queSearch()
|
||||
this.searchBtn()
|
||||
}, e => {
|
||||
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user