Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
super_liu
2022-06-15 17:33:31 +08:00
9 changed files with 199 additions and 107 deletions
@@ -66,23 +66,23 @@
<div class="el-upload__text">点击或拖拽上传文件</div>
</el-upload>
</el-dialog>
<!-- 选择回答人-->
<Role-tree
is-title="选择回答人"
:is-visible.sync="roleFlag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
export default {
name: "answerItem",
props: {
list: {
type: Array,
required: false
},
},
data(){
return{
roleFlag: false,
nodeList: [],
mergeSelectList: [],
// 上传地址
actionPath: 'api/att/attFile/uploadNew',
importModalshowflagtemp: false,
@@ -102,20 +102,25 @@ export default {
methods:{
//提交
handleSubmit(){
this.$emit('emitInsState',false)
let asdId = sessionStorage.getItem('queId')
this.form.fileList = this.fileList
this.form.askId = asdId
this.$http.postData('lawss/Reply/insertReply',{ ...this.form },{
_this: this
}, res => {
if(res.respCode === '200'){
this.form.reply = ''
this.fileList = []
this.$emit('emitInsState',true)
}
}, e => {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('emitInsState',false)
let asdId = sessionStorage.getItem('queId')
this.form.fileList = this.fileList
this.form.askId = asdId
this.$http.postData('lawss/Reply/insertReply',{ ...this.form },{
_this: this
}, res => {
if(res.respCode === '200'){
this.form.reply = ''
this.fileList = []
this.$emit('emitInsState',true)
//此处需要调用父组件中的方法,将问题列表进行刷新操作
}
}, e => {
})
}
})
},
//上传文件
@@ -168,43 +173,40 @@ export default {
}
})
},
checkedRole(data){
let asdId = sessionStorage.getItem('queId')
this.$http.postData('lawss/AskUser/insertAskUser',{
asdId: asdId,
usid: data[0].id,
},{
_this: this
}, res => {
if(res.ok){
this.$message.success('邀请成功')
}
}, e => {
})
},
//问题归档
queArchive(){
let list = []
let mergeList = JSON.parse(sessionStorage.getItem('mergeList'))
for (let i = 0; i < mergeList.length; i++) {
list.push(mergeList[i])
this.mergeSelectList = this.mergeSelectList.filter ( item => item.state !== 'yes' && item.checked);
for (let i = 0; i < this.mergeSelectList.length; i++) {
if(this.mergeSelectList[i].checked){
list.push(this.mergeSelectList[i].id)
}
}
if(this.mergeSelectList && this.mergeSelectList.length > 0){
this.$emit('emitInsState',false)
let listId = list.join(',')
this.$http.post('lawss/Reply/updateReply', {
id: listId,
},{
_this: this
}, res => {
if(res.respCode === '200'){
this.$emit('emitInsState',true)
}
}, e => {
})
}else {
this.$message.warning('请选择归档内容')
}
let listId = list.join(',')
this.$http.post('lawss/Reply/updateReply', {
id: listId,
},{
_this: this
}, res => {
}, e => {
})
},
//邀请
invitation(){
this.roleFlag = true
this.$emit('roleFlagBoo',true)
},
},
mounted () {
this.mergeSelectList = this.list
},
};
</script>
@@ -24,7 +24,7 @@
</div>
</div>
<div style="float: right; margin-top: 20px">
<el-checkbox v-if="answer.checkedShow" @change="answerChang" v-model="answer.checked">归档</el-checkbox>
<el-checkbox v-if="answer.checkedShow" @change="answerChang" :disabled="answer.state && answer.state === 'yes'" v-model="answer.checked">归档</el-checkbox>
</div>
</div>
<!-- <div class="footer-box">-->
@@ -7,7 +7,7 @@
<span>{{stand.standardEncdoing}}</span>
</div>
</div>
<div class="row">
<div class="row" v-if="stand.classification !== 'OTHER'">
<div class="item">
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div>
+81 -44
View File
@@ -19,7 +19,7 @@
<el-button size="mini" @click="delSearch">清空</el-button>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="queBtn" v-if="this.activeName !=='myQue'">提问</el-button>
<el-button size="mini" type="primary" @click="queBtn">提问</el-button>
</el-form-item>
</el-form>
</div>
@@ -63,8 +63,8 @@
</template>
<div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;">
暂无数据
</div>
暂无数据
</div>
</div>
<div style="height: 100%" v-else>
<el-tabs
@@ -80,7 +80,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -138,7 +138,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -196,7 +196,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -254,7 +254,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -334,8 +334,8 @@
</template>
<loading :loading="dataLoading">正在加载数据</loading>
</div>
<div class="info-answer" >
<answer-item @emitInsState="emitInsState"></answer-item>
<div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item :key="aiKey" :list="answerList" @roleFlagBoo="roleFlagBooFunc" @emitInsState="emitInsState"></answer-item>
</div>
</el-tab-pane>
</template>
@@ -395,7 +395,7 @@
</template>
<loading :loading="dataLoading">正在加载数据</loading>
</div>
<div class="info-answer" >
<div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item>
</div>
</el-tab-pane>
@@ -456,7 +456,7 @@
</template>
<loading :loading="dataLoading">正在加载数据</loading>
</div>
<div class="info-answer" >
<div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item>
</div>
</el-tab-pane>
@@ -519,7 +519,7 @@
</template>
<loading :loading="dataLoading">正在加载数据</loading>
</div>
<div class="info-answer" >
<div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item>
</div>
</el-tab-pane>
@@ -582,7 +582,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -640,7 +640,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -698,7 +698,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -756,7 +756,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -1210,6 +1210,13 @@
</div>
</div>
</el-drawer>
<!-- 选择回答人-->
<Role-tree
is-title="选择回答人"
:is-visible.sync="roleFlag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
@@ -1239,7 +1246,10 @@ export default {
},
data(){
return{
aiKey:1,
dataLoading: true,
roleFlag: false,
nodeList: [],
mergeList: [],
historyList: [], //相似历史问题
handleSelectForm: {
@@ -1322,13 +1332,8 @@ export default {
immediate: true,
deep: true,
handler(val) {
this.mergeList = []
val.forEach(item =>{
if(item.checked){
this.mergeList.push(item.id)
}
})
sessionStorage.setItem('mergeList', JSON.stringify(this.mergeList))
this.aiKey++
// sessionStorage.setItem('mergeList', JSON.stringify(this.mergeList))
}
},
'questionForm.problemDescription':{
@@ -1337,8 +1342,26 @@ export default {
}
},
methods:{
checkedRole(data){
if(data[0].id){
let asdId = sessionStorage.getItem('queId')
this.$http.postData('lawss/AskUser/insertAskUser',{
asdId: asdId,
usid: data[0].id,
},{
_this: this
}, res => {
}, e => {
})
}
},
roleFlagBooFunc(boo){
if(boo){
this.roleFlag = true
}
},
emitInsState(state){
console.log(state)
if(state){
this.questionClick()
}else {
@@ -1611,6 +1634,11 @@ export default {
if(res.data.length){
res.data.forEach(item => {
item.checkedShow = true
if(item.state && item.state === 'yes'){
item.checked = true
}else {
item.checked = false
}
})
}
this.answerList = res.data
@@ -1699,6 +1727,7 @@ export default {
_this: this,
}, res => {
this.standList = res.data
this.questionClick()
})
},
//查询订阅标准
@@ -1710,6 +1739,7 @@ export default {
_this: this
}, res => {
this.standList = res.data
this.questionClick()
}, e =>{
})
@@ -1720,6 +1750,7 @@ export default {
_this: this
}, res =>{
this.standList = res.data
this.questionClick()
}, e => {
})
@@ -1796,32 +1827,38 @@ export default {
this.questionForm.standardName = this.questionForm.pubQue
this.questionForm.standardEncdoing = this.questionForm.pubQue
}
if(this.questionForm.standardId){
this.questionForm.fileList = this.fileList
this.$refs['queForm'].validate((valid) => {
if(valid){
this.$http.postData('lawss/AskQuestions/insertAskQuestions',{ ...this.questionForm },
{
_this: this
}, res => {
console.log(res);
this.dialogVisible = false
}, e => {
})
}else{
return this.$message.warning('请输入问题')
}
})
}else{
this.$message.warning('请选择至少一条标准')
if(!this.questionForm.standardId){
this.$message.warning('请选择至少一条标准')
return
}
this.questionForm.fileList = this.fileList
this.$refs['queForm'].validate((valid) => {
if(valid){
this.$http.postData('lawss/AskQuestions/insertAskQuestions',{ ...this.questionForm },
{
_this: this
}, res => {
this.dialogVisible = false
this.activeName = "myQue"
this.activeType = this.standType
this.searchBtn()
}, e => {
})
}else{
return this.$message.warning('请输入问题')
}
})
},
},
};
</script>
<style lang="less" scoped>
/deep/ .contentClass{
height: calc(~ '100% - 40px') !important;
overflow: auto !important;
}
#my-questions{
height: 100%;
display: flex;
@@ -1839,7 +1876,7 @@ export default {
overflow-y: auto;
padding: 0;
.el-tab-pane {
height: 98%;
height: 100%;
}
}
}
@@ -369,6 +369,7 @@
<el-table-column
prop="issueTime"
label="发布日期"
sortable
width="120"
>
<template slot-scope="scope">
@@ -251,6 +251,7 @@
<el-table-column
prop="issueTime"
width="120"
sortable
label="发布日期">
<template slot-scope="scope">
<div v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">
@@ -5,17 +5,17 @@
<div>
<el-button class="dybtn" size="mini" type="primary" @click.stop="subscribe">订阅</el-button>
</div>
<div>
<div class="divWhiteSpace">
<div class="row">
<div class="item">
<div class="item1">
<div>提问
<span>{{question.problemDescription}}</span>
</div>
</div>
</div>
<div class="row">
<div class="row" >
<div class="item">
<div>{{question.answerer}}
<div>{{question.questioner}}
<span>{{question.questionTime}}</span>
</div>
</div>
@@ -67,16 +67,33 @@ export default {
.dybtn{
float: right;
}
.divWhiteSpace{
width: 80%;
}
.row {
line-height: 1.8;
}
.item {
display: inline-block;
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item1 {
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-word;
word-wrap: break-word;
white-space: -moz-pre-wrap;
white-space: -hp-pre-wrap;
white-space: -o-pre-wrap;
white-space: -pre-wrap;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
}
}
/deep/ .el-button--mini {
padding: 5px;
@@ -7,7 +7,7 @@
<span>{{stand.standardEncdoing}}</span>
</div>
</div>
<div class="row">
<div class="row" v-if="stand.classification !== 'OTHER'">
<div class="item">
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div>
@@ -71,7 +71,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -128,7 +128,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -185,7 +185,7 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<div class="contentClass">
<template v-for="(item, index) in answerList">
<div class="clearfix">
<div class="answer-box" >
@@ -242,8 +242,8 @@
<template slot="label">
<questions-item :question="question"></questions-item>
</template>
<div>
<template v-for="(item, index) in answerList">
<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>
@@ -791,7 +791,7 @@ export default {
this.activeName = this.$route.query.standType
this.standSearch()
}else{
switch (this.$route.query.standType){
switch (this.standType){
case 'INLAND':
this.standSearch2()
break
@@ -1048,6 +1048,7 @@ export default {
pubQue : '',//公共问题
classification: 'INLAND', //标准类型
problemDescription: '', //问题
questioner: this.$store.getters.userInfo.userId, //提问人
standardEncdoing: '', //标准编号
standardName: '', //标准名称
standardId:'', //标准id
@@ -1213,8 +1214,27 @@ export default {
{
_this: this
}, res => {
console.log(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
}
}, e => {
})
@@ -1231,6 +1251,10 @@ export default {
</script>
<style lang="less" scoped>
/deep/ .contentClass{
height: calc(~ '100% - 20px');
overflow: auto;
}
#my-questions{
height: 100%;
display: flex;
@@ -1245,6 +1269,7 @@ export default {
margin-right: 0;
}
/deep/.el-tabs__content {
overflow-y: auto;
padding: 0;
.el-tab-pane {
height: 100%;
@@ -1295,6 +1320,15 @@ export default {
background: #F5F7FA;
float: right;
margin: 20px 10px 0 80px;
word-break: break-word; /* 文本行的任意字内断开 */
word-wrap: break-word; /* IE */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP printers */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
}
.info-answer{
height: 200px;