我的问答

This commit is contained in:
宋伟佳
2022-06-07 11:11:14 +08:00
parent d3e84e8110
commit 4a5b42b6c3
6 changed files with 96 additions and 56 deletions
@@ -1,7 +1,7 @@
<!--标准的描述-->
<template>
<div id="stand-item">
<div>
<div style="width: 100%;padding: 10px 0;">
<div id="stand-item">
<div class="row">
<div class="item">
<span>{{stand.standardEncdoing}}</span>
@@ -9,7 +9,7 @@
</div>
<div class="row">
<div class="item">
<span>{{stand.standardName}}</span>
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div>
</div>
</div>
@@ -40,14 +40,18 @@ export default {
<style lang="less" scoped>
#stand-item{
width: 100%;
min-width: 130px;
padding:10px 0;
max-width: 200px;
.row {
line-height: 1.5;
}
.item {
display: inline-block;
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
</style>
@@ -1341,6 +1341,7 @@ export default {
},
addList() {
this.handleSelectForm.dataSource = this.standType
this.handleSelectForm.standType = this.standType
this.searchLawBtn()
this.standModel = true;
},
@@ -1541,6 +1542,16 @@ export default {
},
//提问按钮
queBtn(){
this.questionForm = {
pubQue : '',//公共问题
classification: 'INLAND', //标准类型
problemDescription: '', //问题
questioner: this.$store.getters.userInfo.userId, //提问人
standardEncdoing: '', //标准编号
standardName: '', //标准名称
standardId:'', //标准id
fileList: '',
}
this.dialogVisible = true
},
handleClose(){
@@ -1676,6 +1687,7 @@ export default {
_this: this
}, res => {
console.log(res);
this.dialogVisible = false
}, e => {
})
@@ -11,8 +11,8 @@
</div>
<div class="row">
<div class="item">
<div>附件
<span style="color: #409EFF">{{answer.annex}}</span>
<div style="cursor: pointer;">附件
<span style="color: #409EFF">{{answer.appendixName}}</span>
</div>
</div>
</div>
@@ -23,13 +23,7 @@
</div>
</div>
</div>
<!-- <div>-->
<!-- <el-checkbox v-model="checked">归档</el-checkbox>-->
<!-- </div>-->
</div>
<!-- <div class="footer-box">-->
<!-- </div>-->
</div>
</template>
@@ -39,9 +33,10 @@ export default {
props:['answer'],
data(){
return{
checked: true,
}
},
methods:{
},
watch:{
answer: {
immediate: true,
@@ -1,6 +1,9 @@
<!--问题的描述-->
<template>
<div id="questions-item">
<div>
<el-button class="dybtn" size="mini" type="primary">订阅</el-button>
</div>
<div>
<div class="row">
<div class="item">
@@ -47,6 +50,9 @@ export default {
width: 100%;
min-width: 130px;
padding:10px 0;
.dybtn{
float: right;
}
.row {
line-height: 1.8;
}
@@ -54,4 +60,7 @@ export default {
display: inline-block;
}
}
/deep/ .el-button--mini {
padding: 5px;
}
</style>
@@ -1,7 +1,7 @@
<!--标准的描述-->
<template>
<div id="stand-item">
<div>
<div style="width: 100%;padding: 10px 0;">
<div id="stand-item">
<div class="row">
<div class="item">
<span>{{stand.standardEncdoing}}</span>
@@ -9,7 +9,7 @@
</div>
<div class="row">
<div class="item">
<span>{{stand.standardName}}</span>
<span :title="stand.standardEncdoing + stand.standardName">{{stand.standardName}}</span>
</div>
</div>
</div>
@@ -40,14 +40,18 @@ export default {
<style lang="less" scoped>
#stand-item{
width: 100%;
min-width: 130px;
padding:10px 0;
max-width: 200px;
.row {
line-height: 1.5;
}
.item {
display: inline-block;
width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
</style>
@@ -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>
@@ -277,15 +277,17 @@
<el-radio label="BUSINESS_STAND">企业标准</el-radio>
<el-radio label="OTHER">公共</el-radio>
</el-radio-group>
<el-button size="mini" v-if="standType !== 'OTHER'" style="margin-left: 30px;" type="primary" @click="addList">选择标准</el-button>
<el-select v-if="standType === 'OTHER'" v-model="questionForm.publicType" filterable clearable placeholder="请选择公共" style="margin-left: 30px;appearance: none">
<el-option
v-for="(item, index) in DYGGWT"
:key="index"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<div style="display: inline-block; margin-left: 20px" v-if="standType === 'OTHER'">
<el-select v-model="questionForm.pubQue" placeholder="请选择公共问题">
<el-option
v-for="item in pubOptions"
:key="item.label"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</div>
<el-button v-else size="mini" style="margin-left: 30px;" type="primary" @click="addList">选择标准</el-button>
</el-form-item>
<el-form-item label="问题" prop="problemDescription" class="serch-form-item">
<el-input v-model="questionForm.problemDescription"></el-input>
@@ -706,6 +708,7 @@ export default {
},
data(){
return{
pubOptions: [], //公共问题
handleSelectForm: {
standName: '', //标准名称
numberName: '', //政策名称
@@ -735,7 +738,7 @@ export default {
// 上传地址
actionPath: 'api/att/attFile/uploadNew',
fileList: [], //上传文件的列表
activeName: 'myQue',
activeName: 'INLAND',
activeType: 'INLAND',
activestand: '',
activeQue: '',
@@ -744,7 +747,6 @@ export default {
questionForm:{
classification: 'INLAND', //标准类型
problemDescription: '', //问题
questioner: this.$store.getters.userInfo.userId, //提问人
standardEncdoing: '', //标准编号
standardName: '', //标准名称
standardId:'', //标准id
@@ -760,7 +762,6 @@ export default {
classification: 'INLAND',
standardName: '', //标准名称
standardEncdoing: '', //标准编号
questioner: this.$store.getters.userInfo.userId, //提问人
problemDescription: '', //关键词/问题描述
},
answerList: [],
@@ -777,7 +778,7 @@ export default {
}, res => {
this.setMap(res.data.WBZTCLASS);// 文本状态
this.textState = res.data.WBZTCLASS // 文本状态
this.DYGGWT = res.data.DYGGWT // 问答公共问题
this.pubOptions = res.data.DYGGWT //问答公共问题
}, e => {
});
},
@@ -819,6 +820,7 @@ export default {
},
addList() {
this.handleSelectForm.dataSource = this.standType
this.handleSelectForm.standType = this.standType
this.searchLawBtn()
this.standModel = true;
},
@@ -951,11 +953,10 @@ export default {
this.questionForm.classification = this.standType
},
handleClick(){
console.log(this.activeName);
this.ansSearch()
},
sourceClick(){
this.questionSerach.classification = this.activeType
this.questionSerach.classification = this.activeName
this.questionSerach.standardEncdoing = ''
this.standSearch()
},
@@ -975,6 +976,15 @@ export default {
},
//提问按钮
queBtn(){
this.questionForm = {
pubQue : '',//公共问题
classification: 'INLAND', //标准类型
problemDescription: '', //问题
standardEncdoing: '', //标准编号
standardName: '', //标准名称
standardId:'', //标准id
fileList: '',
}
this.dialogVisible = true
},
handleClose(){
@@ -1006,7 +1016,7 @@ export default {
})
},
//查询标准
//查询提问标准
standSearch(){
this.$http.get('lawss/AskQuestions/getAskQuestionsDetails',{ ...this.questionSerach },{
_this: this
@@ -1082,27 +1092,33 @@ export default {
// this.questionForm.fileInfo = list
},
//提交问题
queSubmit(){
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);
}, e => {
queSubmit(){
if(this.standType === 'OTHER'){
this.questionForm.standardId = this.questionForm.pubQue
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('请选择至少一条标准')
}
},
})
}else{
return this.$message.warning('请输入问题')
}
})
}else{
this.$message.warning('请选择至少一条标准')
}
},
},
};
</script>