提交 03ffa8f3 编写于 作者: chendeli's avatar chendeli

add

上级 00fdd61b
......@@ -37,12 +37,13 @@ service.interceptors.response.use(
apiUrl时,返回200为成功
*/
if (res.code !== '000000') {
return Promise.reject('error')
return Promise.reject(response.data)
} else {
return response.data
}
},
error => {
// logger.error('err' + error)
return Promise.reject(error)
}
......
......@@ -210,7 +210,12 @@ export default {
this.GET('/interaction/informConfig/getInformList',parm).then((res) => {
if( res.code == '000000' ) {
if(res.data.length == 0){
this.reportData = [{}]
}else{
this.reportData = this.handelEmail(res.data,1) || []
}
}else{
this.$message({
......
......@@ -218,9 +218,9 @@ export default {
//保存修改讨论组件详细
subFun(){
///let A = ['PUT','POST']
let A = this.isEdit ? this.reType[0] : this.reType[1];
//console.log(this[A])
let _this = this;
if(this.objInfo.topic.content.length == 0){
this.showError('内容不能为空!');
......@@ -231,13 +231,14 @@ export default {
subject:this.objInfo.topic.subject,
content:this.objInfo.topic.content,
discussid:this.objInfo.topic.discussid || this.discussId,
id:this.objInfo.topic.id
id:this.objInfo.topic.id || null
},
images:this.fileList
}
this[A]('/interaction/topic/',parm).then((res) => {
// closeLoading(vm)
if( res.code == '000000' ) {
this.$message({
message: '操作成功!',
......@@ -247,8 +248,17 @@ export default {
this.$emit('setFun',true)
},2000)
}else{
this.$message({
message: res.message,
type: 'error'
});
}
})
}).catch(function (error) {
///console.log()
//_this.$message.error('接口异常请联系管理员');
});
}
}
};
......
......@@ -8,7 +8,7 @@
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item label="话题名称:">
<el-input clearable v-model="searchParam.theme" size="mini" placeholder="请输入话题名称"></el-input>
</el-form-item>
......@@ -40,10 +40,10 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
<el-col style="text-align:right;padding:0 30px 15px 0;">
<el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button>
<!-- <el-button type="primary" size="small" @click="search">查询</el-button>
<el-button type="default" size="small" @click="reseat">重置</el-button> -->
<el-button type="primary" size="small" @click="createTopic">新建话题</el-button>
</el-col>
</el-form>
......@@ -188,7 +188,7 @@ export default {
//获取数据
getData(){
let _this = this;
this.loading = true;
let parm = {
discussId:this.discussId,
......@@ -206,7 +206,11 @@ export default {
type: 'warning'
});
}
})
}).catch(function (error) {
console.log(error.message)
_this.$message.error(error.message);
_this.loading = false
});
},
......@@ -288,7 +292,7 @@ export default {
}
}
this.$confirm('确定要'+str+'该讨论吗?', '提示', {
this.$confirm('确定要'+str+'该话题吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册