
<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.nId"
                    label="状态编码"
                    :rules="form.rules.nIdRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.name"
                    label="状态名称"
                    :rules="form.rules.nameRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.description"
                    label="状态描述"
                    :rules="form.rules.descriptionRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.color"
                    label="颜色"
                    :rules="form.rules.colorRules"
                  ></v-text-field>
            
            

            

        
              
            

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

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

            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isInitial"
                    label="是否初始状态"
                    :rules="form.rules.isInitialRules"
                 >
                  </v-checkbox>
            

        
                               <v-text-field
                    v-model="form.model.outcome"
                    label="结果"
                    :rules="form.rules.outcomeRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.stateMachineId"
                    label="状态机Id"
                    :rules="form.rules.stateMachineIdRules"
                  ></v-text-field>
            
            

            

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

export default {
    mixins: [mixins.formSave],
    data() {
        return {
          title: '状态',
          actions: { add, edit, update },
          parent: this,
          form: {
            model: {
                      /** 是否删除 */
              isDeleted: false,
                          /** 是否锁定 */
              isLocked: false,
                          /** 是否冻结 */
              isFrozen: false,
                           /** 状态编码 */
              nId: '',
                       /** 状态名称 */
              name: '',
                       /** 状态描述 */
              description: '',
                       /** 颜色 */
              color: '',
                      /** 是否隐藏 */
              isHidden: false,
                           /** 是否系统定义 */
              isSystemDefined: '',
                      /** 是否初始状态 */
              isInitial: false,
                           /** 结果 */
              outcome: '',
                       /** 状态机Id */
              stateMachineId: ''
                },
            rules: {
                        isDeletedRules: [
                                (v) => !!v || '是否删除 is required',
                                ],
                        isLockedRules: [
                                (v) => !!v || '是否锁定 is required',
                                ],
                        isFrozenRules: [
                                (v) => !!v || '是否冻结 is required',
                                ],
                        nIdRules: [
                                (v) => !!v || '状态编码 is required',
                                ],
                        nameRules: [
                                (v) => !!v || '状态名称 is required',
                                ],
                        descriptionRules: [
                                (v) => !!v || '状态描述 is required',
                                ],
                        colorRules: [
                                (v) => !!v || '颜色 is required',
                                ],
                        isHiddenRules: [
                                (v) => !!v || '是否隐藏 is required',
                                ],
                        isSystemDefinedRules: [
                                (v) => !!v || '是否系统定义 is required',
                                ],
                        isInitialRules: [
                                (v) => !!v || '是否初始状态 is required',
                                ],
                        outcomeRules: [
                                (v) => !!v || '结果 is required',
                                ],
                        stateMachineIdRules: [
                                (v) => !!v || '状态机Id is required',
                                ],
                        }
          }
        }
      },
    }
</script>
