
<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-checkbox  
                    v-model="form.model.leadingZeros"
                    label="前导零"
                    :rules="form.rules.leadingZerosRules"
                 >
                  </v-checkbox>
            

        
                               <v-text-field
                    v-model="form.model.timeBaseReset"
                    label="重置时间"
                    :rules="form.rules.timeBaseResetRules"
                  ></v-text-field>
            
            

            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isTransactional"
                    label="是否交易"
                    :rules="form.rules.isTransactionalRules"
                 >
                  </v-checkbox>
            

        
              
            

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

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

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: '',
                       /** 初始值 */
              seed: '',
                       /** 增量 */
              increment: '',
                       /** 最大值 */
              maxValue: '',
                      /** 前导零 */
              leadingZeros: false,
                           /** 重置时间 */
              timeBaseReset: '',
                      /** 是否交易 */
              isTransactional: false,
                          /** 是否隐藏 */
              isHidden: false
                    },
            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',
                                ],
                        seedRules: [
                                (v) => !!v || '初始值 is required',
                                ],
                        incrementRules: [
                                (v) => !!v || '增量 is required',
                                ],
                        maxValueRules: [
                                (v) => !!v || '最大值 is required',
                                ],
                        leadingZerosRules: [
                                (v) => !!v || '前导零 is required',
                                ],
                        timeBaseResetRules: [
                                (v) => !!v || '重置时间 is required',
                                ],
                        isTransactionalRules: [
                                (v) => !!v || '是否交易 is required',
                                ],
                        isHiddenRules: [
                                (v) => !!v || '是否隐藏 is required',
                                ],
                        }
          }
        }
      },
    }
</script>
