
<template>
   <nm-form-vuetify-drawer ref="form" v-bind="form" v-on="on" :parent="parent" :title="title" placement="left" :visible.sync="visible_">
          
              
            

                             <v-checkbox  
                    v-model="form.model.isDeleted"
                    label="是否删除"
                    :rules="form.rules.isDeletedRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isLocked"
                    label="是否锁定"
                    :rules="form.rules.isLockedRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isFrozen"
                    label="是否冻结"
                    :rules="form.rules.isFrozenRules"
                 >
                  </v-checkbox>
            

        
                               <v-text-field
                    v-model="form.model.verb"
                    label="动作"
                    :rules="form.rules.verbRules"
                  ></v-text-field>
            
            

            

        
              
            

                             <v-checkbox  
                    v-model="form.model.doRaiseEvent"
                    label="触发事件"
                    :rules="form.rules.doRaiseEventRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isHidden"
                    label="是否隐藏"
                    :rules="form.rules.isHiddenRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isSystemDefined"
                    label="是否系统定义"
                    :rules="form.rules.isSystemDefinedRules"
                 >
                  </v-checkbox>
            

        
                               <v-text-field
                    v-model="form.model.targetStatusId"
                    label="目标状态Id"
                    :rules="form.rules.targetStatusIdRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.sourceStatusId"
                    label="源状态Id"
                    :rules="form.rules.sourceStatusIdRules"
                  ></v-text-field>
            
            

            

            </nm-form-vuetify-drawer>
</template>
<script>
import { mixins } from 'xmanager-ui'
const { add, edit, update } = $api.reference.statusTransition

export default {
    mixins: [mixins.formSave],
    data() {
        return {
          title: '状态转换',
          actions: { add, edit, update },
          parent: this,
          form: {
            model: {
                      /** 是否删除 */
              isDeleted: false,
                          /** 是否锁定 */
              isLocked: false,
                          /** 是否冻结 */
              isFrozen: false,
                           /** 动作 */
              verb: '',
                      /** 触发事件 */
              doRaiseEvent: false,
                          /** 是否隐藏 */
              isHidden: false,
                          /** 是否系统定义 */
              isSystemDefined: false,
                           /** 目标状态Id */
              targetStatusId: '',
                       /** 源状态Id */
              sourceStatusId: ''
                },
            rules: {
                        isDeletedRules: [
                                (v) => !!v || '是否删除 is required',
                                ],
                        isLockedRules: [
                                (v) => !!v || '是否锁定 is required',
                                ],
                        isFrozenRules: [
                                (v) => !!v || '是否冻结 is required',
                                ],
                        verbRules: [
                                (v) => !!v || '动作 is required',
                                ],
                        doRaiseEventRules: [
                                (v) => !!v || '触发事件 is required',
                                ],
                        isHiddenRules: [
                                (v) => !!v || '是否隐藏 is required',
                                ],
                        isSystemDefinedRules: [
                                (v) => !!v || '是否系统定义 is required',
                                ],
                        targetStatusIdRules: [
                                (v) => !!v || '目标状态Id is required',
                                ],
                        sourceStatusIdRules: [
                                (v) => !!v || '源状态Id is required',
                                ],
                        }
          }
        }
      },
    }
</script>
