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

This commit is contained in:
super_liu
2022-06-07 09:11:48 +08:00
26 changed files with 4794 additions and 210 deletions
@@ -326,7 +326,7 @@
<a v-if="scope.row.standStatusShow === '作废'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standCode
}}</a>
<a v-if="scope.row.standStatusShow === '参考'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{
<a v-if="scope.row.standStatusShow === '参考'" style="color: #98E165" @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standCode
}}</a>
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{
@@ -0,0 +1,190 @@
<!--我的回答-->
<template>
<div>
<el-divider style="margin: 10px 0;"></el-divider>
<div id="message-content">
<el-form ref="form" :model="form" :rules="rules">
<el-form-item prop="textarea">
<el-input
type="textarea"
:rows="2"
placeholder="请输入回答内容"
v-model="form.textarea">
</el-input>
</el-form-item>
<div>
<el-button
type="primary"
class="common-button-primary"
size="small"
style="float: right;"
@click="handleSubmit"
>提交</el-button>
<el-button
type="primary"
class="common-button-primary"
size="small"
style="float: right;margin-right: 10px;"
@click="openUploadFileDialog"
>上传文件</el-button>
<el-button
type="primary"
class="common-button-primary"
size="small"
style="float: right;"
@click="queArchive"
>问题归档</el-button>
<el-button
type="primary"
class="common-button-primary"
size="small"
style="float: right;margin-right: 10px;"
@click="invitation"
>邀请</el-button>
</div>
</el-form>
</div>
<el-dialog
width='400px'
:visible.sync="importModalshowflagtemp"
title="上传文件"
:footer-hide="true"
append-to-body
>
<el-upload
multiple
drag
:on-success="uploadSuccess"
:before-upload="beforeUpload"
:on-remove="removeOneFile"
:action="actionPath"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
name="file"
:file-list="fileList"
ref="importFileAboutStand">
<i class="el-icon-upload"></i>
<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",
data(){
return{
roleFlag: false,
nodeList: [],
// 上传地址
actionPath: 'api/att/attFile/uploadNew',
importModalshowflagtemp: false,
fileList: [],
form:{
textarea: '',
invitationId: '',
invitationName: '',
},
rules: {
textarea: [
{ required: true, message: '请输入回复内容', trigger: 'blur' },
{ min: 1, max: 500, message: '长度在 1 到 500 个字符', trigger: 'blur' }
]
},
}
},
methods:{
//提交
handleSubmit(){
this.form.fileList = this.fileList
console.log(this.form);
},
//上传文件
openUploadFileDialog(){
this.importModalshowflagtemp = true
},
//上传成功
uploadSuccess(res,file,fileList){
if(res.ok){
this.fileList.push(res.data)
this.$message.success('上传成功')
}else{
this.$message.warning(res.message)
fileList.pop()
}
this.importModalshowflagtemp = false
},
//文件上传前
beforeUpload(file){
console.log(file);
var filename = file.name;
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
//把后缀转大写
if(fileSuffix){
fileSuffix = fileSuffix.toUpperCase()
}
// 判断上传文件格式
if (fileSuffix === ".PDF" || fileSuffix === ".DOC" || fileSuffix === ".DOCX" || fileSuffix === ".PPT"
|| fileSuffix === ".PPTX" || fileSuffix === ".XLS" || fileSuffix === ".XLSX"
|| fileSuffix === ".PNG" || fileSuffix === ".JPG" || fileSuffix === ".JPEG") {
return true;
} else {
this.$message.error("文件" + file.name + "格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件");
return false;
}
// 判断文件上传大小
if (file.size / 1024 / 1024 > 300) {
this.$message.warning("文件" + file.name + "大小不能超过300M");
return false;
}
return true;
},
//删除文件
removeOneFile(){
this.fileList.forEach((item,index) => {
if(item.name === file.name || item.id === file.id){
this.fileList.splice(index, 1)
}
})
},
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(){
},
//邀请
invitation(){
this.roleFlag = true
},
},
};
</script>
<style lang="less" scoped>
#message-content{
}
</style>
@@ -0,0 +1,76 @@
<!--回答框-->
<template>
<div id="answer-item">
<div>
<div class="row">
<div class="item">
<div>回答
<span>{{answer. reply}}</span>
</div>
</div>
</div>
<div class="row">
<div class="item">
<div>附件
<span style="color: #409EFF">{{answer.annex}}</span>
</div>
</div>
</div>
<div class="row" style="float: right; margin-right: 10px">
<div class="item">
<div>{{answer.answerer}}
<span>{{answer.replyTime}}</span>
</div>
</div>
</div>
<!-- <div>-->
<!-- <el-checkbox v-model="checked">归档</el-checkbox>-->
<!-- </div>-->
</div>
<!-- <div class="footer-box">-->
<!-- </div>-->
</div>
</template>
<script>
export default {
name: "questionItemInfo",
props:['answer'],
data(){
return{
checked: true,
}
},
watch:{
answer: {
immediate: true,
deep: true,
handler(val) {
this.answer = val
}
}
}
};
</script>
<style lang="less" scoped>
#answer-item{
width: 100%;
min-width: 130px;
padding: 15px 5px;
.row {
line-height: 1.8;
}
.item {
display: inline-block;
}
.footer-box{
height: 200px;
width: 100%;
position: absolute;
bottom: 0;
border-top: 1px solid #cccccc;
}
}
</style>
@@ -0,0 +1,57 @@
<!--问题的描述-->
<template>
<div id="questions-item">
<div>
<div class="row">
<div class="item">
<div>提问
<span>{{question.problemDescription}}</span>
</div>
</div>
</div>
<div class="row">
<div class="item">
<div>{{userName}}
<span>{{question.questionTime}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "questions-item",
props: ['question'],
computed: {
},
data(){
return{
userName: this.$store.getters.userInfo.userName,
}
},
watch:{
question: {
immediate: true,
deep: true,
handler(val){
}
}
}
};
</script>
<style lang="less" scoped>
#questions-item{
width: 100%;
min-width: 130px;
padding:10px 0;
.row {
line-height: 1.8;
}
.item {
display: inline-block;
}
}
</style>
@@ -0,0 +1,53 @@
<!--标准的描述-->
<template>
<div id="stand-item">
<div>
<div class="row">
<div class="item">
<span>{{stand.standardEncdoing}}</span>
</div>
</div>
<div class="row">
<div class="item">
<span>{{stand.standardName}}</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "stand-item",
props: ['stand'],
computed: {
},
data(){
return{
}
},
watch:{
stand: {
immediate: true,
deep: true,
handler(val) {
this.stand = val
}
}
}
};
</script>
<style lang="less" scoped>
#stand-item{
width: 100%;
min-width: 130px;
padding:10px 0;
.row {
line-height: 1.5;
}
.item {
display: inline-block;
}
}
</style>
File diff suppressed because it is too large Load Diff