anchor.diff:  
     }
   
  +  void riActions(){
  +    _controller.text = widget.ruleName;
  +
  +    ruleActionCell.removeRange(0, ruleActionCell.length);
  +
  +    for (var v in widget.ruleInfo.rhs){     //遍历动作
  +
  +      String text1 = TypeJudgment.judgmentType(v.cmd.subDeviceId!=null||v.cmd.subDeviceId!=''?v.cmd.subDeviceId.substring(4,8):v.cmd.deviceId.substring(4,8));
  +
  +      String text2 = '';
  +      if (v.cmd.argInt32.length != 0 && v.cmd.argInt32 != null){    //数值动作
  +        text2 = v.cmd.argInt32.first == 1?'开启':'关闭';
  +      }
  +
  +      DeviceRuleType ruleType = TypeJudgment.judgmentDeviceRuleType(v.cmd.subDeviceId!=null||v.cmd.subDeviceId!=''?v.cmd.subDeviceId.substring(4,8):v.cmd.deviceId.substring(4,8));
  +
  +      AiAddRuleCell ruleCell = new AiAddRuleCell(
  +        text1: text1,
  +        text2: text2,
  +        text3: '一直持续',
  +        deviceRuleType: ruleType,
  +        controlCallback: (){
  +          switch (ruleType){
  +            case DeviceRuleType.DeviceRuleTypeSwitch:     //开关
  +              {
  +                AiSwitchScene switchScene = new AiSwitchScene(isSwitchOn: v.cmd.argInt32.first == 1, callback: (bool isOpen){
  +                  SIOTCMD cmd = new SIOTCMD()
  +                    ..deviceId = v.cmd.deviceId
  +                    ..subDeviceId = v.cmd.subDeviceId
  +                    ..cmdid = 201
  +                    ..argInt32.add(isOpen?1:0);
  +
  +                  v.actionType = 1;
  +                  v.cmd = cmd;
  +
  +                },);
  +                Navigator.of(context).push(new MaterialPageRoute(
  +                    builder: (BuildContext context) => new NavigationBar(switchScene, text1,
  +                      actions: <Widget>[
  +                        new RightBtnItem('设置', (){
  +                          print('设置');
  +                        })
  +                      ],)
  +                ));
  +              }
  +              break;
  +            case DeviceRuleType.DeviceRuleTypeScene:      //场景
  +              break;
  +            case DeviceRuleType.DeviceRuleTypeLight:      //灯光
  +              {
  +                AiLightScene lightScene = new AiLightScene(isSwitchOn: v.cmd.argInt32.first == 1, changeColorsCallback: (int r, int g, int b){
  +                  print('r = $r   g = $g   b = $b');
  +                  SIOTCMD cmd = new SIOTCMD()
  +                    ..deviceId = v.cmd.deviceId
  +                    ..subDeviceId = v.cmd.subDeviceId
  +                    ..cmdid = 201
  +                    ..argInt32.add(1);
  +
  +                  v.actionType = 1;
  +                  v.cmd = cmd;
  +
  +                },);
  +                Navigator.of(context).push(new MaterialPageRoute(
  +                    builder: (BuildContext context) => new NavigationBar(lightScene, text1,
  +                      actions: <Widget>[
  +                        new RightBtnItem('设置', (){
  +                          print('设置');
  +                        })
  +                      ],)
  +                ));
  +              }
  +              break;
  +            case DeviceRuleType.DeviceRuleTypeCommon:     //大众
  +              break;
  +          }
  +        },
  +        timeCallback: (){
  +          print('时间回调');
  +        },
  +      );
  +
  +      ruleActionCell.add(ruleCell);
  +      print('$v');
  +    }
  +  }
  +
     Widget createDecCondition(String decName, bool isTurnOn, String openStr, String closeStr){
       return new Container(
         padding: const EdgeInsets.only(bottom: 1.0),
  
positive.code:     conditionList.add(new GestureDetector(
        onTap: (){
          print('添加条件');
          AiAddCondition addCondition = new AiAddCondition(existExps: widget.ruleInfo.exprs,callback: (ConditonType type, List<String> conditionTextList, List<DecState> conditionStates, List<ExprInfo> exprInfos){
  
            for (var v in exprInfos){
  
negative.code:               }
              }
  
              for (String tmp in tmpList){
                conditionTextList.remove(tmp);
              }
  