123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- export const loginModuleLabels: Record<UnionKey.LoginModule, string> = {
- 'pwd-login': '账密登录',
- 'code-login': '手机验证码登录',
- register: '注册',
- 'reset-pwd': '重置密码',
- 'bind-wechat': '微信绑定'
- };
- export const userRoleLabels: Record<Auth.RoleType, string> = {
- super: '超级管理员',
- admin: '管理员',
- user: '普通用户'
- };
- export const userRoleOptions: Common.OptionWithKey<Auth.RoleType>[] = [
- { value: 'super', label: userRoleLabels.super },
- { value: 'admin', label: userRoleLabels.admin },
- { value: 'user', label: userRoleLabels.user }
- ];
- /** 用户性别 */
- export const genderLabels: Record<UserManagement.GenderKey, string> = {
- 0: '女',
- 1: '男'
- };
- export const genderOptions: Common.OptionWithKey<UserManagement.GenderKey>[] = [
- { value: '0', label: genderLabels['0'] },
- { value: '1', label: genderLabels['1'] }
- ];
- /** 用户状态 */
- export const userStatusLabels: Record<UserManagement.UserStatusKey, string> = {
- 1: '启用',
- 2: '禁用',
- 3: '冻结',
- 4: '软删除'
- };
- export const userStatusOptions: Common.OptionWithKey<UserManagement.UserStatusKey>[] = [
- { value: '1', label: userStatusLabels['1'] },
- { value: '2', label: userStatusLabels['2'] },
- { value: '3', label: userStatusLabels['3'] },
- { value: '4', label: userStatusLabels['4'] }
- ];
- /**
- * 0 无效类型
- * 1 日期类型
- * 2 时间类型
- * 3 字符串
- * 4 小数类型
- * 5 bool类型
- * 6 整数类型
- */
- export const fieldTypeLabels: Record<BackgroundField.FieldTypeKey, string> = {
- 0: '无效类型',
- 1: '日期类型',
- 2: '时间类型',
- 3: '字符串',
- 4: '小数类型',
- 5: '布尔类型',
- 6: '整数类型'
- };
- export const fieldTypeOptions: Common.OptionWithKey<BackgroundField.FieldTypeKey>[] = [
- { value: 1, label: fieldTypeLabels['1'] },
- { value: 2, label: fieldTypeLabels['2'] },
- { value: 3, label: fieldTypeLabels['3'] },
- { value: 4, label: fieldTypeLabels['4'] },
- { value: 5, label: fieldTypeLabels['5'] },
- { value: 6, label: fieldTypeLabels['6'] }
- ];
- /**
- * 组件类型
- * 0 单行文本
- * 1 多行文本
- * 2 下拉框
- * 3 单选框
- * 4 多选框
- * 5 日期选择器
- * 6 时间选择器
- * 7 开关
- */
- export const componentsTypeLabels: Record<BackgroundField.ComponentsTypeKey, string> = {
- 0: '单行文本',
- 1: '多行文本',
- 2: '下拉框',
- 3: '单选框',
- 4: '多选框',
- 5: '日期选择器',
- 6: '时间选择器',
- 7: '开关'
- };
- export const componentsTypeOptions: Common.OptionWithKey<BackgroundField.ComponentsTypeKey>[] = [
- { value: 0, label: componentsTypeLabels['0'] },
- { value: 1, label: componentsTypeLabels['1'] },
- { value: 2, label: componentsTypeLabels['2'] },
- { value: 3, label: componentsTypeLabels['3'] },
- { value: 4, label: componentsTypeLabels['4'] },
- { value: 5, label: componentsTypeLabels['5'] },
- { value: 6, label: componentsTypeLabels['6'] }
- ];
- export const EventIsShowLabels: Record<BackgroundEvent.IsShowKey, string> = {
- 0: '无效',
- 1: '是',
- 2: '否'
- };
- export const EventIsShowOptions: Common.OptionWithKey<BackgroundEvent.IsShowKey>[] = [
- { value: 0, label: EventIsShowLabels['0'] },
- { value: 1, label: EventIsShowLabels['1'] },
- { value: 2, label: EventIsShowLabels['2'] }
- ];
- export const IndicatorsIsShowLabels: Record<BackgroundIndicators.IsShowKey, string> = {
- 0: '无效',
- 1: '是',
- 2: '否'
- };
- export const IndicatorsOptions: Common.OptionWithKey<BackgroundEvent.IsShowKey>[] = [
- { value: 0, label: IndicatorsIsShowLabels['0'] },
- { value: 1, label: IndicatorsIsShowLabels['1'] },
- { value: 2, label: IndicatorsIsShowLabels['2'] }
- ];
- export const EditSelectBoxIsShow: Common.OptionWithKey<number>[] = [
- { label: '是', value: 1 },
- { label: '否', value: 2 }
- ];
- export const EditSelectBoxShowLine: Common.OptionWithKey<number>[] = [
- { label: '1行', value: 1 },
- { label: '2行', value: 2 },
- { label: '3行', value: 3 }
- ];
- export const EditSelectBoxDataSource: Common.OptionWithKey<number>[] = [
- { label: '录入', value: 1 },
- { label: '自动生成', value: 2 }
- ];
- export const EditSelectBoxTriggerOperation: Common.OptionWithKey<number>[] = [
- { label: '新增', value: 1 },
- { label: '删除', value: 2 }
- ];
- export const EditSelectBoxStartTime: Common.OptionWithKey<number>[] = [
- { label: '等于当天', value: 1 },
- { label: '大于当天', value: 2 },
- { label: '大于等于当天', value: 3 }
- ];
- export const WorkflowIsShowLabels: Record<BackgroundWorkflow.IsShowKey, string> = {
- 0: '无效',
- 1: '是',
- 2: '否'
- };
- export const MqttPastureIsGroupLabels: Record<ApiMqttPasture.IsGroupKey, string> = {
- 0: '无效',
- 1: '是',
- 2: '否'
- };
- export const MqttPastureIsGroupOptions: Common.OptionWithKey<ApiMqttPasture.IsGroupKey>[] = [
- { value: 1, label: MqttPastureIsGroupLabels['1'] },
- { value: 2, label: MqttPastureIsGroupLabels['2'] }
- ];
- /** 主题动作 */
- export const userTopicAccessLabel: Record<ApiMqttUser.IsAccessKey, string> = {
- 1: '发布',
- 2: '订阅',
- 3: '发布订阅'
- };
- export const UserTopicAccessOptions: Common.OptionWithKey<ApiMqttUser.IsAccessKey>[] = [
- { value: 1, label: userTopicAccessLabel['1'] },
- { value: 2, label: userTopicAccessLabel['2'] },
- { value: 3, label: userTopicAccessLabel['3'] }
- ];
- /** 主题动作 */
- export const topicAccessLabel: Record<ApiMqttTopic.AccessKey, string> = {
- 1: '订阅',
- 2: '发布'
- };
- export const TopicAccessOptions: Common.OptionWithKey<ApiMqttTopic.AccessKey>[] = [
- { value: 1, label: topicAccessLabel['1'] },
- { value: 2, label: topicAccessLabel['2'] }
- ];
|