Przeglądaj źródła

byh24/10/31-规则增删改查完成

byh 2 tygodni temu
rodzic
commit
a3b6112996
1 zmienionych plików z 18 dodań i 3 usunięć
  1. 18 3
      src/lsjbxm/jituangongneng/rule.vue

+ 18 - 3
src/lsjbxm/jituangongneng/rule.vue

@@ -199,8 +199,11 @@
 <!--修改规则弹出窗口-->
     <el-dialog v-model="dialogFormUpdateVisible" title="修改规则" width="500">
         <el-form :model="form">
-            <el-form-item label="规则名称" :label-width="100" label-position="left" required>
-                <el-input v-model="form.gzname" placeholder="请输入规则名称" style="width: 200px"/>
+            <el-form-item label="原规则名称" :label-width="100" label-position="left" required>
+                <el-input v-model="form.gzname" placeholder="请输入原规则名称" style="width: 200px"/>
+            </el-form-item>
+            <el-form-item label="新规则名称" :label-width="100" label-position="left" required>
+                <el-input v-model="newgzname" placeholder="请输入新规则名称" style="width: 200px"/>
             </el-form-item>
             <el-form-item label="轮次数" label-suffix="(次)" :label-width="100" label-position="left" required>
                 <el-select v-model="form.luncishu" style="width: 200px" clearable="true" placeholder=" ">
@@ -285,6 +288,7 @@ export default {
             form:{
 
             },
+            newgzname:'',
 
             dialogFormUpdateVisible: false,//修改规则弹窗控制
 
@@ -340,6 +344,7 @@ export default {
             this.form.luncishu = ''
             this.form.luncitime = ''
             this.form.jiangetime = ''
+            this.newgzname = ''
         },
 
         //删除规则
@@ -371,7 +376,17 @@ export default {
         //修改规则
         updategz() {
 
-            http.lsjbPost("/guize/updateGuiZe.lsjb",this.form).then(()=>{
+            //!!!!!这里的顺序要和dialog弹窗里的顺序一致,要不然总是识别不到!!!!!
+            let obj={
+                gzname: this.form.gzname,         //原规则名称
+                newgzname: this.newgzname,        //新规则名称
+                luncishu: this.form.luncishu,     // 轮次数
+                luncitime: this.form.luncitime,   // 轮次时间
+                jiangetime: this.form.jiangetime, // 间隔时长
+
+            }
+
+            http.lsjbPost("/guize/updateGuiZe.lsjb",obj).then(()=>{
                 //更新显示的规则列表
                 return this.listgz()