7.8(导出
This commit is contained in:
@@ -1,33 +1,25 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogVisible"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
:close-on-click-modal="false"
|
||||
width="1100px"
|
||||
>
|
||||
<el-dialog v-if="dialogVisible" :title="title" :visible.sync="dialogVisible" :before-close="handleClose"
|
||||
:close-on-click-modal="false" width="1100px">
|
||||
<!-- class="demo-ruleForm" -->
|
||||
<el-form :model="user" ref="user" inline v-loading="loading" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="名称" prop="name" :rules="{ required: true, message: '请输入', trigger: 'blur' }">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model.trim="user.name" placeholder="请输入"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item
|
||||
label="积分数量"
|
||||
prop="integral"
|
||||
:rules="{ required: true, message: '请输入', trigger: 'blur' }"
|
||||
>
|
||||
<el-input-number
|
||||
type="text"
|
||||
step-strictly
|
||||
v-model.trim="user.integral"
|
||||
:min="0"
|
||||
:max="999999"
|
||||
></el-input-number>
|
||||
<el-form-item label="话题" prop="topicId" >
|
||||
<el-select v-model="user.topicId" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in topicList" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="积分数量" prop="integral" :rules="{ required: true, message: '请输入', trigger: 'blur' }">
|
||||
<el-input-number type="text" step-strictly v-model.trim="user.integral" :min="0"
|
||||
:max="999999"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
@@ -51,7 +43,8 @@
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="简介" prop="intro" :rules="{ required: true, message: '请输入', trigger: 'blur' }">
|
||||
<el-input type="textarea" :rows="2" placeholder="请输入" v-model="user.intro" style="width: 200px;"> </el-input>
|
||||
<el-input type="textarea" :rows="2" placeholder="请输入" v-model="user.intro" style="width: 200px;">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -71,6 +64,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {communityTopicListApi} from "@/api/community"
|
||||
import { addtopicAPI, updateTopicAPI } from '@/api/marketing';
|
||||
import { Debounce } from '@/utils/validate';
|
||||
import Tinymce from '@/components/Tinymce/index';
|
||||
@@ -114,6 +108,8 @@ export default {
|
||||
loading: false,
|
||||
levelNum: [],
|
||||
levelNumDataNew: this.levelNumData,
|
||||
//话题列表
|
||||
topicList:[]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -124,6 +120,12 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
created(){
|
||||
communityTopicListApi().then(res=>{
|
||||
console.log(res);
|
||||
this.topicList=res.list
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
levelData() {
|
||||
this.levelNum.map((i) => {
|
||||
@@ -175,28 +177,28 @@ export default {
|
||||
};
|
||||
this.user.id
|
||||
? updateTopicAPI(data)
|
||||
.then((res) => {
|
||||
this.$message.success('编辑成功');
|
||||
this.loading = false;
|
||||
this.handleClose();
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.$parent.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
.then((res) => {
|
||||
this.$message.success('编辑成功');
|
||||
this.loading = false;
|
||||
this.handleClose();
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.$parent.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
: addtopicAPI(this.user)
|
||||
.then((res) => {
|
||||
this.$message.success('添加成功');
|
||||
this.loading = false;
|
||||
this.handleClose();
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.$parent.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
});
|
||||
.then((res) => {
|
||||
this.$message.success('添加成功');
|
||||
this.loading = false;
|
||||
this.handleClose();
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
this.$parent.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.formValidate = Object.assign({}, obj);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,14 +25,8 @@
|
||||
<el-table-column label="昵称" prop="userNickname" />
|
||||
<el-table-column label="手机号" prop="phone" />
|
||||
<el-table-column label="禁言时间" prop="bannedTime">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-statistic :value="scope.row.bannedTime" time-indices title="🎉商品降价🎉">
|
||||
<template slot="suffix">
|
||||
抢购即将开始
|
||||
</template>
|
||||
</el-statistic> -->
|
||||
{{ scope.row.bannedTime }}秒 </template>
|
||||
{{ scope.row.bannedDay }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="禁言开始时间" prop="bannedStartTime" />
|
||||
<el-table-column label="禁言结束时间" prop="bannedEndTime" />
|
||||
|
||||
Reference in New Issue
Block a user