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> <div class="el-upload__text">点击或拖拽上传文件</div>
</el-upload> </el-upload>
</el-dialog> </el-dialog>
<!-- 选择回答人-->
<Role-tree
is-title="选择回答人"
:is-visible.sync="roleFlag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "answerItem", name: "answerItem",
props: {
list: {
type: Array,
required: false
},
},
data(){ data(){
return{ return{
roleFlag: false, roleFlag: false,
nodeList: [], nodeList: [],
mergeSelectList: [],
// 上传地址 // 上传地址
actionPath: 'api/att/attFile/uploadNew', actionPath: 'api/att/attFile/uploadNew',
importModalshowflagtemp: false, importModalshowflagtemp: false,
@@ -102,20 +102,25 @@ export default {
methods:{ methods:{
//提交 //提交
handleSubmit(){ handleSubmit(){
this.$emit('emitInsState',false) this.$refs['form'].validate((valid) => {
let asdId = sessionStorage.getItem('queId') if (valid) {
this.form.fileList = this.fileList this.$emit('emitInsState',false)
this.form.askId = asdId let asdId = sessionStorage.getItem('queId')
this.$http.postData('lawss/Reply/insertReply',{ ...this.form },{ this.form.fileList = this.fileList
_this: this this.form.askId = asdId
}, res => { this.$http.postData('lawss/Reply/insertReply',{ ...this.form },{
if(res.respCode === '200'){ _this: this
this.form.reply = '' }, res => {
this.fileList = [] if(res.respCode === '200'){
this.$emit('emitInsState',true) this.form.reply = ''
} this.fileList = []
}, e => { 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(){ queArchive(){
let list = [] let list = []
let mergeList = JSON.parse(sessionStorage.getItem('mergeList')) this.mergeSelectList = this.mergeSelectList.filter ( item => item.state !== 'yes' && item.checked);
for (let i = 0; i < mergeList.length; i++) { for (let i = 0; i < this.mergeSelectList.length; i++) {
list.push(mergeList[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(){ invitation(){
this.roleFlag = true this.$emit('roleFlagBoo',true)
}, },
}, },
mounted () {
this.mergeSelectList = this.list
},
}; };
</script> </script>
@@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div style="float: right; margin-top: 20px"> <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> </div>
<!-- <div class="footer-box">--> <!-- <div class="footer-box">-->
@@ -7,7 +7,7 @@
<span>{{stand.standardEncdoing}}</span> <span>{{stand.standardEncdoing}}</span>
</div> </div>
</div> </div>
<div class="row"> <div class="row" v-if="stand.classification !== 'OTHER'">
<div class="item"> <div class="item">
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span> <span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div> </div>
+81 -44
View File
@@ -19,7 +19,7 @@
<el-button size="mini" @click="delSearch">清空</el-button> <el-button size="mini" @click="delSearch">清空</el-button>
</el-form-item> </el-form-item>
<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-item>
</el-form> </el-form>
</div> </div>
@@ -63,8 +63,8 @@
</template> </template>
<div v-if="!questionsList || questionsList.length === 0"> <div v-if="!questionsList || questionsList.length === 0">
<div style="padding: 20px;"> <div style="padding: 20px;">
暂无数据 暂无数据
</div> </div>
</div> </div>
<div style="height: 100%" v-else> <div style="height: 100%" v-else>
<el-tabs <el-tabs
@@ -80,7 +80,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -138,7 +138,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -196,7 +196,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -254,7 +254,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -334,8 +334,8 @@
</template> </template>
<loading :loading="dataLoading">正在加载数据</loading> <loading :loading="dataLoading">正在加载数据</loading>
</div> </div>
<div class="info-answer" > <div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item> <answer-item :key="aiKey" :list="answerList" @roleFlagBoo="roleFlagBooFunc" @emitInsState="emitInsState"></answer-item>
</div> </div>
</el-tab-pane> </el-tab-pane>
</template> </template>
@@ -395,7 +395,7 @@
</template> </template>
<loading :loading="dataLoading">正在加载数据</loading> <loading :loading="dataLoading">正在加载数据</loading>
</div> </div>
<div class="info-answer" > <div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item> <answer-item @emitInsState="emitInsState"></answer-item>
</div> </div>
</el-tab-pane> </el-tab-pane>
@@ -456,7 +456,7 @@
</template> </template>
<loading :loading="dataLoading">正在加载数据</loading> <loading :loading="dataLoading">正在加载数据</loading>
</div> </div>
<div class="info-answer" > <div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item> <answer-item @emitInsState="emitInsState"></answer-item>
</div> </div>
</el-tab-pane> </el-tab-pane>
@@ -519,7 +519,7 @@
</template> </template>
<loading :loading="dataLoading">正在加载数据</loading> <loading :loading="dataLoading">正在加载数据</loading>
</div> </div>
<div class="info-answer" > <div class="info-answer" v-if="answerList && answerList.length > 0">
<answer-item @emitInsState="emitInsState"></answer-item> <answer-item @emitInsState="emitInsState"></answer-item>
</div> </div>
</el-tab-pane> </el-tab-pane>
@@ -582,7 +582,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -640,7 +640,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -698,7 +698,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -756,7 +756,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -1210,6 +1210,13 @@
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
<!-- 选择回答人-->
<Role-tree
is-title="选择回答人"
:is-visible.sync="roleFlag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div> </div>
</template> </template>
@@ -1239,7 +1246,10 @@ export default {
}, },
data(){ data(){
return{ return{
aiKey:1,
dataLoading: true, dataLoading: true,
roleFlag: false,
nodeList: [],
mergeList: [], mergeList: [],
historyList: [], //相似历史问题 historyList: [], //相似历史问题
handleSelectForm: { handleSelectForm: {
@@ -1322,13 +1332,8 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
handler(val) { handler(val) {
this.mergeList = [] this.aiKey++
val.forEach(item =>{ // sessionStorage.setItem('mergeList', JSON.stringify(this.mergeList))
if(item.checked){
this.mergeList.push(item.id)
}
})
sessionStorage.setItem('mergeList', JSON.stringify(this.mergeList))
} }
}, },
'questionForm.problemDescription':{ 'questionForm.problemDescription':{
@@ -1337,8 +1342,26 @@ export default {
} }
}, },
methods:{ 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){ emitInsState(state){
console.log(state)
if(state){ if(state){
this.questionClick() this.questionClick()
}else { }else {
@@ -1611,6 +1634,11 @@ export default {
if(res.data.length){ if(res.data.length){
res.data.forEach(item => { res.data.forEach(item => {
item.checkedShow = true item.checkedShow = true
if(item.state && item.state === 'yes'){
item.checked = true
}else {
item.checked = false
}
}) })
} }
this.answerList = res.data this.answerList = res.data
@@ -1699,6 +1727,7 @@ export default {
_this: this, _this: this,
}, res => { }, res => {
this.standList = res.data this.standList = res.data
this.questionClick()
}) })
}, },
//查询订阅标准 //查询订阅标准
@@ -1710,6 +1739,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
this.standList = res.data this.standList = res.data
this.questionClick()
}, e =>{ }, e =>{
}) })
@@ -1720,6 +1750,7 @@ export default {
_this: this _this: this
}, res =>{ }, res =>{
this.standList = res.data this.standList = res.data
this.questionClick()
}, e => { }, e => {
}) })
@@ -1796,32 +1827,38 @@ export default {
this.questionForm.standardName = this.questionForm.pubQue this.questionForm.standardName = this.questionForm.pubQue
this.questionForm.standardEncdoing = this.questionForm.pubQue this.questionForm.standardEncdoing = this.questionForm.pubQue
} }
if(this.questionForm.standardId){ if(!this.questionForm.standardId){
this.questionForm.fileList = this.fileList this.$message.warning('请选择至少一条标准')
this.$refs['queForm'].validate((valid) => { return
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('请选择至少一条标准')
} }
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> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .contentClass{
height: calc(~ '100% - 40px') !important;
overflow: auto !important;
}
#my-questions{ #my-questions{
height: 100%; height: 100%;
display: flex; display: flex;
@@ -1839,7 +1876,7 @@ export default {
overflow-y: auto; overflow-y: auto;
padding: 0; padding: 0;
.el-tab-pane { .el-tab-pane {
height: 98%; height: 100%;
} }
} }
} }
@@ -369,6 +369,7 @@
<el-table-column <el-table-column
prop="issueTime" prop="issueTime"
label="发布日期" label="发布日期"
sortable
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@@ -251,6 +251,7 @@
<el-table-column <el-table-column
prop="issueTime" prop="issueTime"
width="120" width="120"
sortable
label="发布日期"> label="发布日期">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C"> <div v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'" style="color: #F56C6C">
@@ -5,17 +5,17 @@
<div> <div>
<el-button class="dybtn" size="mini" type="primary" @click.stop="subscribe">订阅</el-button> <el-button class="dybtn" size="mini" type="primary" @click.stop="subscribe">订阅</el-button>
</div> </div>
<div> <div class="divWhiteSpace">
<div class="row"> <div class="row">
<div class="item"> <div class="item1">
<div>提问 <div>提问
<span>{{question.problemDescription}}</span> <span>{{question.problemDescription}}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" >
<div class="item"> <div class="item">
<div>{{question.answerer}} <div>{{question.questioner}}
<span>{{question.questionTime}}</span> <span>{{question.questionTime}}</span>
</div> </div>
</div> </div>
@@ -67,16 +67,33 @@ export default {
.dybtn{ .dybtn{
float: right; float: right;
} }
.divWhiteSpace{
width: 80%;
}
.row { .row {
line-height: 1.8; line-height: 1.8;
} }
.item { .item {
display: inline-block; display: inline-block;
width: 200px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; 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 { /deep/ .el-button--mini {
padding: 5px; padding: 5px;
@@ -7,7 +7,7 @@
<span>{{stand.standardEncdoing}}</span> <span>{{stand.standardEncdoing}}</span>
</div> </div>
</div> </div>
<div class="row"> <div class="row" v-if="stand.classification !== 'OTHER'">
<div class="item"> <div class="item">
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span> <span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div> </div>
@@ -71,7 +71,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -128,7 +128,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -185,7 +185,7 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
@@ -242,8 +242,8 @@
<template slot="label"> <template slot="label">
<questions-item :question="question"></questions-item> <questions-item :question="question"></questions-item>
</template> </template>
<div> <div class="contentClass">
<template v-for="(item, index) in answerList"> <template v-for="(item, index) in answerList">
<div class="clearfix"> <div class="clearfix">
<div class="answer-box" > <div class="answer-box" >
<question-item-info :answer="item"></question-item-info> <question-item-info :answer="item"></question-item-info>
@@ -791,7 +791,7 @@ export default {
this.activeName = this.$route.query.standType this.activeName = this.$route.query.standType
this.standSearch() this.standSearch()
}else{ }else{
switch (this.$route.query.standType){ switch (this.standType){
case 'INLAND': case 'INLAND':
this.standSearch2() this.standSearch2()
break break
@@ -1048,6 +1048,7 @@ export default {
pubQue : '',//公共问题 pubQue : '',//公共问题
classification: 'INLAND', //标准类型 classification: 'INLAND', //标准类型
problemDescription: '', //问题 problemDescription: '', //问题
questioner: this.$store.getters.userInfo.userId, //提问人
standardEncdoing: '', //标准编号 standardEncdoing: '', //标准编号
standardName: '', //标准名称 standardName: '', //标准名称
standardId:'', //标准id standardId:'', //标准id
@@ -1213,8 +1214,27 @@ export default {
{ {
_this: this _this: this
}, res => { }, res => {
console.log(res);
this.dialogVisible = false 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 => { }, e => {
}) })
@@ -1231,6 +1251,10 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .contentClass{
height: calc(~ '100% - 20px');
overflow: auto;
}
#my-questions{ #my-questions{
height: 100%; height: 100%;
display: flex; display: flex;
@@ -1245,6 +1269,7 @@ export default {
margin-right: 0; margin-right: 0;
} }
/deep/.el-tabs__content { /deep/.el-tabs__content {
overflow-y: auto;
padding: 0; padding: 0;
.el-tab-pane { .el-tab-pane {
height: 100%; height: 100%;
@@ -1295,6 +1320,15 @@ export default {
background: #F5F7FA; background: #F5F7FA;
float: right; float: right;
margin: 20px 10px 0 80px; 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{ .info-answer{
height: 200px; height: 200px;