shaogen1995 пре 4 година
родитељ
комит
ec1b777f57

+ 1 - 1
src/pages/cultural-relic/index.vue

@@ -19,7 +19,7 @@
             <el-input style="width:220px;margin:0 20px;" v-model="inputKey" placeholder="请输入文物名称搜索"></el-input>
             <el-button type="primary" @click="getInformation">查找</el-button>
             <el-button @click="inputKey=''">重置</el-button>
-            <el-select style="margin-left:20px;" @change="piliang" :value="'批量导入 '" placeholder="请选择">
+            <el-select style="margin-left:20px;" @change="piliang" :value="'批量导入 '" placeholder="请选择" v-if="0">
               <el-option
                 label="模板下载"
                 value="模板下载">

+ 11 - 7
src/pages/scene/addScene.vue

@@ -44,8 +44,8 @@
             </el-form-item>
           </el-form>
         </div>
-        <el-button type="primary" @click="add" style="margin-left: 50px">新增</el-button>
-        <el-button @click="reset">重置</el-button>
+        <el-button type="primary" @click="add" style="margin-left: 50px">保存</el-button>
+        <el-button @click="cancel">取消</el-button>
       </div>
     </div>
   </div>
@@ -101,12 +101,16 @@ export default {
       })
       console.log('新增成功', result)
       this.$message.success('新增成功')
-      this.reset()
+      this.$router.go(-1)
     },
-    // 点击重置
-    reset () {
-      this.$refs.ruleForm.resetFields()
-      this.ruleForm.thumb = ''
+    // 重置
+    // reset () {
+    //   this.$refs.ruleForm.resetFields()
+    //   this.ruleForm.thumb = ''
+    // },
+    // 点击取消
+    cancel () {
+      this.$router.go(-1)
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 11 - 6
src/pages/scene/editScene.vue

@@ -44,8 +44,8 @@
             </el-form-item>
           </el-form>
         </div>
-        <el-button type="primary" @click="add" style="margin-left: 50px">编辑</el-button>
-        <el-button @click="reset">重置</el-button>
+        <el-button type="primary" @click="add" style="margin-left: 50px">保存</el-button>
+        <el-button @click="cancel">取消</el-button>
       </div>
     </div>
   </div>
@@ -101,11 +101,16 @@ export default {
       })
       console.log('编辑成功', result)
       this.$message.success('编辑成功')
+      this.$router.go(-1)
     },
-    // 点击重置
-    reset () {
-      this.$refs.ruleForm.resetFields()
-      this.ruleForm.thumb = ''
+    // 重置
+    // reset () {
+    //   this.$refs.ruleForm.resetFields()
+    //   this.ruleForm.thumb = ''
+    // },
+    // 点击取消
+    cancel () {
+      this.$router.go(-1)
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 12 - 8
src/pages/video/addVideo.vue

@@ -65,9 +65,9 @@
           </el-form>
         </div>
         <el-button type="primary" @click="add" style="margin-left: 50px"
-          >新增</el-button
+          >保存</el-button
         >
-        <el-button @click="reset">重置</el-button>
+        <el-button @click="cancel">取消</el-button>
       </div>
     </div>
   </div>
@@ -153,14 +153,18 @@ export default {
         data: this.ruleForm
       })
       this.$message.success('新增成功')
-      this.reset()
+      this.$router.go(-1)
     },
     // 点击重置
-    reset () {
-      this.$refs.ruleForm.resetFields()
-      this.ruleForm.urlVideo = ''
-      this.ruleForm.thumb = ''
-      this.contentUrlList = []
+    // cancel () {
+    //   this.$refs.ruleForm.cancelFields()
+    //   this.ruleForm.urlVideo = ''
+    //   this.ruleForm.thumb = ''
+    //   this.contentUrlList = []
+    // }
+    // 点击取消
+    cancel () {
+      this.$router.go(-1)
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)

+ 12 - 7
src/pages/video/editVideo.vue

@@ -65,9 +65,9 @@
           </el-form>
         </div>
         <el-button type="primary" @click="add" style="margin-left: 50px"
-          >编辑</el-button
+          >保存</el-button
         >
-        <el-button @click="reset">重置</el-button>
+        <el-button @click="cancel">取消</el-button>
       </div>
     </div>
   </div>
@@ -154,14 +154,19 @@ export default {
         data: this.ruleForm
       })
       this.$message.success('编辑成功')
+      this.$router.go(-1)
     },
     // 点击重置
-    reset () {
-      this.$refs.ruleForm.resetFields()
-      this.ruleForm.urlVideo = ''
-      this.ruleForm.thumb = ''
-      this.contentUrlList = []
+    // reset () {
+    //   this.$refs.ruleForm.resetFields()
+    //   this.ruleForm.urlVideo = ''
+    //   this.ruleForm.thumb = ''
+    //   this.contentUrlList = []
+    // }    // 点击取消
+    cancel () {
+      this.$router.go(-1)
     }
+
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   async created () {