|
@@ -9,12 +9,13 @@
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirm">确定</el-button>
|
|
|
+ <el-button type="primary" :loading="comfirmLoading" @click="handleConfirm">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { editSuggestion } from "@/api/video";
|
|
|
export default {
|
|
|
name: "EditSuggestion",
|
|
|
props: {
|
|
@@ -29,7 +30,7 @@ export default {
|
|
|
suggestion: null
|
|
|
},
|
|
|
dialogVisible: false,
|
|
|
- loading: false,
|
|
|
+ comfirmLoading: false,
|
|
|
rules: {
|
|
|
suggestion: [
|
|
|
{ required: true, message: "请输入建议", trigger: "blur" }
|
|
@@ -44,7 +45,15 @@ export default {
|
|
|
handleConfirm() {
|
|
|
this.$refs.suggestionForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.$emit("confirm", this.form);
|
|
|
+ this.comfirmLoading = true;
|
|
|
+ editSuggestion(this.form).then(res =>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.$emit("confirm");
|
|
|
+ }
|
|
|
+ }).finally(()=>{
|
|
|
+ this.comfirmLoading = false;
|
|
|
+ })
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|