Browse Source

平板策略引用跳转至查看页面

gzb
guozhongbo 7 months ago
parent
commit
272fa204d2
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      src/views/schoolSection/strategy/publicStrategy.vue

+ 8
- 3
src/views/schoolSection/strategy/publicStrategy.vue View File

1
 <template>
1
 <template>
2
   <div class="index1">
2
   <div class="index1">
3
     <div class="operation">
3
     <div class="operation">
4
-      <span @click="curState = 2">修改</span>
4
+      <span v-if="curState === 1" @click="curState = 2">修改</span>
5
       <span
5
       <span
6
         style="font-size: 13px"
6
         style="font-size: 13px"
7
         v-if="curClass.type === strategyInfo.sttype"
7
         v-if="curClass.type === strategyInfo.sttype"
250
         style="text-align: center; margin-top: 20px"
250
         style="text-align: center; margin-top: 20px"
251
         v-if="curState === 2"
251
         v-if="curState === 2"
252
       >
252
       >
253
-        <Button style="margin-right: 16px" @click="curState = 1">取消</Button>
253
+        <Button style="margin-right: 16px" @click="cancel">取消</Button>
254
         <Button type="primary" class="primary_btn" @click="save()">保存</Button>
254
         <Button type="primary" class="primary_btn" @click="save()">保存</Button>
255
       </div>
255
       </div>
256
     </div>
256
     </div>
492
           }
492
           }
493
           //刷新左侧树
493
           //刷新左侧树
494
           this.$emit("refresh");
494
           this.$emit("refresh");
495
-          this.curState = 2; //编辑状态
495
+          this.curState = 1; //查看状态
496
           this.stPadInfo.show = false;
496
           this.stPadInfo.show = false;
497
         } else {
497
         } else {
498
           this.$Message.error(res.msg);
498
           this.$Message.error(res.msg);
556
     timesChange(times) {
556
     timesChange(times) {
557
       this.strategyInfo.padTimes = times;
557
       this.strategyInfo.padTimes = times;
558
     },
558
     },
559
+    cancel(){
560
+      //取消
561
+      this.curState = 1;
562
+      this.detail();
563
+    },
559
     save() {
564
     save() {
560
       if (
565
       if (
561
         !this.strategyInfo.hastime &&
566
         !this.strategyInfo.hastime &&

Loading…
Cancel
Save