| | |
| | | velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));
|
| | | velocityContext.put("columns", genTable.getColumns());
|
| | | velocityContext.put("table", genTable);
|
| | | velocityContext.put("dicts", getDicts(genTable));
|
| | | setMenuVelocityContext(velocityContext, genTable);
|
| | | if (GenConstants.TPL_TREE.equals(tplCategory))
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 根据列类型获取字典组
|
| | | * |
| | | * @param genTable 业务表对象
|
| | | * @return 返回字典组
|
| | | */
|
| | | public static String getDicts(GenTable genTable)
|
| | | {
|
| | | List<GenTableColumn> columns = genTable.getColumns();
|
| | | List<String> dicts = new ArrayList<String>();
|
| | | for (GenTableColumn column : columns)
|
| | | {
|
| | | if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
|
| | | column.getHtmlType(), new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO }))
|
| | | {
|
| | | dicts.add("'" + column.getDictType() + "'");
|
| | | }
|
| | | }
|
| | | return StringUtils.join(dicts, ", ");
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取权限前缀
|
| | | *
|
| | | * @param moduleName 模块名称
|
| | |
| | | <el-form-item label="${comment}" prop="${column.javaField}">
|
| | | <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
| | | <el-option
|
| | | v-for="dict in ${column.javaField}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | #elseif($column.list && "" != $column.dictType)
|
| | | <el-table-column label="${comment}" align="center" prop="${javaField}">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
|
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | #elseif($column.list && "" != $javaField)
|
| | |
| | | <el-form-item label="${comment}" prop="${field}">
|
| | | <el-select v-model="form.${field}" placeholder="请选择${comment}">
|
| | | <el-option
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end
|
| | |
|
| | | ></el-option>
|
| | | </el-select>
|
| | |
| | | <el-form-item label="${comment}">
|
| | | <el-checkbox-group v-model="form.${field}">
|
| | | <el-checkbox
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue">
|
| | | {{dict.dictLabel}}
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.value">
|
| | | {{dict.label}}
|
| | | </el-checkbox>
|
| | | </el-checkbox-group>
|
| | | </el-form-item>
|
| | |
| | | <el-form-item label="${comment}">
|
| | | <el-radio-group v-model="form.${field}">
|
| | | <el-radio
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end
|
| | |
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | #elseif($column.htmlType == "radio" && $dictType)
|
| | |
| | |
|
| | | export default {
|
| | | name: "${BusinessName}",
|
| | | #if(${dicts} != '')
|
| | | dicts: [${dicts}],
|
| | | #end
|
| | | components: {
|
| | | Treeselect
|
| | | },
|
| | |
| | | // 是否显示弹出层
|
| | | open: false,
|
| | | #foreach ($column in $columns)
|
| | | #set($parentheseIndex=$column.columnComment.indexOf("("))
|
| | | #if($parentheseIndex != -1)
|
| | | #set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
| | | #else
|
| | | #set($comment=$column.columnComment)
|
| | | #end
|
| | | #if(${column.dictType} != '')
|
| | | // $comment字典
|
| | | ${column.javaField}Options: [],
|
| | | #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
| | | #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
| | | #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
| | | // $comment时间范围
|
| | | daterange${AttrName}: [],
|
| | |
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | | #foreach ($column in $columns)
|
| | | #if(${column.dictType} != '')
|
| | | this.getDicts("${column.dictType}").then(response => {
|
| | | this.${column.javaField}Options = response.data;
|
| | | });
|
| | | #end
|
| | | #end
|
| | | },
|
| | | methods: {
|
| | | /** 查询${functionName}列表 */
|
| | |
| | | <el-form-item label="${comment}" prop="${column.javaField}">
|
| | | <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
| | | <el-option
|
| | | v-for="dict in ${column.javaField}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | #elseif($column.list && "" != $column.dictType)
|
| | | <el-table-column label="${comment}" align="center" prop="${javaField}">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
|
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | #elseif($column.list && "" != $javaField)
|
| | |
| | | <el-form-item label="${comment}" prop="${field}">
|
| | | <el-select v-model="form.${field}" placeholder="请选择${comment}">
|
| | | <el-option
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end
|
| | |
|
| | | ></el-option>
|
| | | </el-select>
|
| | |
| | | <el-form-item label="${comment}">
|
| | | <el-checkbox-group v-model="form.${field}">
|
| | | <el-checkbox
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue">
|
| | | {{dict.dictLabel}}
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | :label="dict.value">
|
| | | {{dict.label}}
|
| | | </el-checkbox>
|
| | | </el-checkbox-group>
|
| | | </el-form-item>
|
| | |
| | | <el-form-item label="${comment}">
|
| | | <el-radio-group v-model="form.${field}">
|
| | | <el-radio
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
|
| | | v-for="dict in dict.type.${dictType}"
|
| | | :key="dict.value"
|
| | | #if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end
|
| | |
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | #elseif($column.htmlType == "radio" && $dictType)
|
| | |
| | |
|
| | | export default {
|
| | | name: "${BusinessName}",
|
| | | #if(${dicts} != '')
|
| | | dicts: [${dicts}],
|
| | | #end
|
| | | data() {
|
| | | return {
|
| | | // 遮罩层
|
| | |
| | | // 是否显示弹出层
|
| | | open: false,
|
| | | #foreach ($column in $columns)
|
| | | #set($parentheseIndex=$column.columnComment.indexOf("("))
|
| | | #if($parentheseIndex != -1)
|
| | | #set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
| | | #else
|
| | | #set($comment=$column.columnComment)
|
| | | #end
|
| | | #if(${column.dictType} != '')
|
| | | // $comment字典
|
| | | ${column.javaField}Options: [],
|
| | | #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
| | | #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
| | | #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
| | | // $comment时间范围
|
| | | daterange${AttrName}: [],
|
| | |
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | | #foreach ($column in $columns)
|
| | | #if(${column.dictType} != '')
|
| | | this.getDicts("${column.dictType}").then(response => {
|
| | | this.${column.javaField}Options = response.data;
|
| | | });
|
| | | #end
|
| | | #end
|
| | | },
|
| | | methods: {
|
| | | /** 查询${functionName}列表 */
|
对比新文件 |
| | |
| | | import Vue from 'vue'
|
| | | import DataDict from '@/utils/dict'
|
| | | import { getDicts as getDicts } from '@/api/system/dict/data'
|
| | |
|
| | | function install() {
|
| | | Vue.use(DataDict, {
|
| | | metas: {
|
| | | '*': {
|
| | | labelField: 'dictLabel',
|
| | | valueField: 'dictValue',
|
| | | request(dictMeta) {
|
| | | return getDicts(dictMeta.type).then(res => res.data)
|
| | | },
|
| | | },
|
| | | },
|
| | | })
|
| | | }
|
| | |
|
| | | export default {
|
| | | install,
|
| | | } |
| | |
| | | <template> |
| | | <div> |
| | | <template v-for="(item, index) in options"> |
| | | <template v-if="values.includes(item.dictValue)"> |
| | | <template v-if="values.includes(item.value)"> |
| | | <span |
| | | v-if="item.listClass == 'default' || item.listClass == ''" |
| | | :key="item.dictValue" |
| | | v-if="item.raw.listClass == 'default' || item.raw.listClass == ''" |
| | | :key="item.value" |
| | | :index="index" |
| | | :class="item.cssClass" |
| | | >{{ item.dictLabel }}</span |
| | | :class="item.raw.cssClass" |
| | | >{{ item.label }}</span |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :disable-transitions="true" |
| | | :key="item.dictValue" |
| | | :key="item.value" |
| | | :index="index" |
| | | :type="item.listClass == 'primary' ? '' : item.listClass" |
| | | :class="item.cssClass" |
| | | :type="item.raw.listClass == 'primary' ? '' : item.raw.listClass" |
| | | :class="item.raw.cssClass" |
| | | > |
| | | {{ item.dictLabel }} |
| | | {{ item.label }} |
| | | </el-tag> |
| | | </template> |
| | | </template> |
| | |
| | | import DictTag from '@/components/DictTag'
|
| | | // 头部标签组件
|
| | | import VueMeta from 'vue-meta'
|
| | | // 字典数据组件
|
| | | import DictData from '@/components/DictData'
|
| | |
|
| | | // 全局方法挂载
|
| | | Vue.prototype.getDicts = getDicts
|
| | |
| | |
|
| | | Vue.use(directive)
|
| | | Vue.use(VueMeta)
|
| | | DictData.install()
|
| | |
|
| | | /**
|
| | | * If you don't want to use mock-server
|
对比新文件 |
| | |
| | | import Vue from 'vue'
|
| | | import { mergeRecursive } from "@/utils/ruoyi";
|
| | | import DictMeta from './DictMeta'
|
| | | import DictData from './DictData'
|
| | |
|
| | | const DEFAULT_DICT_OPTIONS = {
|
| | | types: [],
|
| | | }
|
| | |
|
| | | /**
|
| | | * @classdesc 字典
|
| | | * @property {Object} label 标签对象,内部属性名为字典类型名称
|
| | | * @property {Object} dict 字段数组,内部属性名为字典类型名称
|
| | | * @property {Array.<DictMeta>} _dictMetas 字典元数据数组
|
| | | */
|
| | | export default class Dict {
|
| | | constructor() {
|
| | | this.owner = null
|
| | | this.label = {}
|
| | | this.type = {}
|
| | | }
|
| | |
|
| | | init(options) {
|
| | | if (options instanceof Array) {
|
| | | options = { types: options }
|
| | | }
|
| | | const opts = mergeRecursive(DEFAULT_DICT_OPTIONS, options)
|
| | | if (opts.types === undefined) {
|
| | | throw new Error('need dict types')
|
| | | }
|
| | | const ps = []
|
| | | this._dictMetas = opts.types.map(t => DictMeta.parse(t))
|
| | | this._dictMetas.forEach(dictMeta => {
|
| | | const type = dictMeta.type
|
| | | Vue.set(this.label, type, {})
|
| | | Vue.set(this.type, type, [])
|
| | | if (dictMeta.lazy) {
|
| | | return
|
| | | }
|
| | | ps.push(loadDict(this, dictMeta))
|
| | | })
|
| | | return Promise.all(ps)
|
| | | }
|
| | |
|
| | | /**
|
| | | * 重新加载字典
|
| | | * @param {String} type 字典类型
|
| | | */
|
| | | reloadDict(type) {
|
| | | const dictMeta = this._dictMetas.find(e => e.type === type)
|
| | | if (dictMeta === undefined) {
|
| | | return Promise.reject(`the dict meta of ${type} was not found`)
|
| | | }
|
| | | return loadDict(this, dictMeta)
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 加载字典
|
| | | * @param {Dict} dict 字典
|
| | | * @param {DictMeta} dictMeta 字典元数据
|
| | | * @returns {Promise}
|
| | | */
|
| | | function loadDict(dict, dictMeta) {
|
| | | return dictMeta.request(dictMeta)
|
| | | .then(response => {
|
| | | const type = dictMeta.type
|
| | | let dicts = dictMeta.responseConverter(response, dictMeta)
|
| | | if (!(dicts instanceof Array)) {
|
| | | console.error('the return of responseConverter must be Array.<DictData>')
|
| | | dicts = []
|
| | | } else if (dicts.filter(d => d instanceof DictData).length !== dicts.length) {
|
| | | console.error('the type of elements in dicts must be DictData')
|
| | | dicts = []
|
| | | }
|
| | | dict.type[type].splice(0, Number.MAX_SAFE_INTEGER, ...dicts)
|
| | | dicts.forEach(d => {
|
| | | Vue.set(dict.label[type], d.value, d.label)
|
| | | })
|
| | | return dicts
|
| | | })
|
| | | }
|
对比新文件 |
| | |
| | | import DictOptions from './DictOptions'
|
| | | import DictData from './DictData'
|
| | |
|
| | | export default function(dict, dictMeta) {
|
| | | const label = determineDictField(dict, dictMeta.labelField, ...DictOptions.DEFAULT_LABEL_FIELDS)
|
| | | const value = determineDictField(dict, dictMeta.valueField, ...DictOptions.DEFAULT_VALUE_FIELDS)
|
| | | return new DictData(dict[label], dict[value], dict)
|
| | | }
|
| | |
|
| | | /**
|
| | | * 确定字典字段
|
| | | * @param {DictData} dict
|
| | | * @param {...String} fields
|
| | | */
|
| | | function determineDictField(dict, ...fields) {
|
| | | return fields.find(f => Object.prototype.hasOwnProperty.call(dict, f))
|
| | | }
|
对比新文件 |
| | |
| | | /**
|
| | | * @classdesc 字典数据
|
| | | * @property {String} label 标签
|
| | | * @property {*} value 标签
|
| | | * @property {Object} raw 原始数据
|
| | | */
|
| | | export default class DictData {
|
| | | constructor(label, value, raw) {
|
| | | this.label = label
|
| | | this.value = value
|
| | | this.raw = raw
|
| | | }
|
| | | }
|
对比新文件 |
| | |
| | | import { mergeRecursive } from "@/utils/ruoyi";
|
| | | import DictOptions from './DictOptions'
|
| | |
|
| | | /**
|
| | | * @classdesc 字典元数据
|
| | | * @property {String} type 类型
|
| | | * @property {Function} request 请求
|
| | | * @property {String} label 标签字段
|
| | | * @property {String} value 值字段
|
| | | */
|
| | | export default class DictMeta {
|
| | | constructor(options) {
|
| | | this.type = options.type
|
| | | this.request = options.request,
|
| | | this.responseConverter = options.responseConverter
|
| | | this.labelField = options.labelField
|
| | | this.valueField = options.valueField
|
| | | this.lazy = options.lazy === true
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 解析字典元数据
|
| | | * @param {Object} options
|
| | | * @returns {DictMeta}
|
| | | */
|
| | | DictMeta.parse= function(options) {
|
| | | let opts = null
|
| | | if (typeof options === 'string') {
|
| | | opts = DictOptions.metas[options] || {}
|
| | | opts.type = options
|
| | | } else if (typeof options === 'object') {
|
| | | opts = options
|
| | | }
|
| | | opts = mergeRecursive(DictOptions.metas['*'], opts)
|
| | | return new DictMeta(opts)
|
| | | }
|
对比新文件 |
| | |
| | | import { mergeRecursive } from "@/utils/ruoyi";
|
| | | import dictConverter from './DictConverter'
|
| | |
|
| | | export const options = {
|
| | | metas: {
|
| | | '*': {
|
| | | /**
|
| | | * 字典请求,方法签名为function(dictMeta: DictMeta): Promise
|
| | | */
|
| | | request: (dictMeta) => {
|
| | | console.log(`load dict ${dictMeta.type}`)
|
| | | return Promise.resolve([])
|
| | | },
|
| | | /**
|
| | | * 字典响应数据转换器,方法签名为function(response: Object, dictMeta: DictMeta): DictData
|
| | | */
|
| | | responseConverter,
|
| | | labelField: 'label',
|
| | | valueField: 'value',
|
| | | },
|
| | | },
|
| | | /**
|
| | | * 默认标签字段
|
| | | */
|
| | | DEFAULT_LABEL_FIELDS: ['label', 'name', 'title'],
|
| | | /**
|
| | | * 默认值字段
|
| | | */
|
| | | DEFAULT_VALUE_FIELDS: ['value', 'id', 'uid', 'key'],
|
| | | }
|
| | |
|
| | | /**
|
| | | * 映射字典
|
| | | * @param {Object} response 字典数据
|
| | | * @param {DictMeta} dictMeta 字典元数据
|
| | | * @returns {DictData}
|
| | | */
|
| | | function responseConverter(response, dictMeta) {
|
| | | const dicts = response.content instanceof Array ? response.content : response
|
| | | if (dicts === undefined) {
|
| | | console.warn(`no dict data of "${dictMeta.type}" found in the response`)
|
| | | return []
|
| | | }
|
| | | return dicts.map(d => dictConverter(d, dictMeta))
|
| | | }
|
| | |
|
| | | export function mergeOptions(src) {
|
| | | mergeRecursive(options, src)
|
| | | }
|
| | |
|
| | | export default options
|
对比新文件 |
| | |
| | | import Dict from './Dict'
|
| | | import { mergeOptions } from './DictOptions'
|
| | |
|
| | | export default function(Vue, options) {
|
| | | mergeOptions(options)
|
| | | Vue.mixin({
|
| | | data() {
|
| | | if (this.$options.dicts === undefined || this.$options.dicts === null) {
|
| | | return {}
|
| | | }
|
| | | const dict = new Dict()
|
| | | dict.owner = this
|
| | | return {
|
| | | dict
|
| | | }
|
| | | },
|
| | | created() {
|
| | | if (!(this.dict instanceof Dict)) {
|
| | | return
|
| | | }
|
| | | options.onCreated && options.onCreated(this.dict)
|
| | | this.dict.init(this.$options.dicts).then(() => {
|
| | | options.onReady && options.onReady(this.dict)
|
| | | this.$nextTick(() => {
|
| | | this.$emit('dictReady', this.dict)
|
| | | if (this.$options.methods && this.$options.methods.onDictReady instanceof Function) {
|
| | | this.$options.methods.onDictReady.call(this, this.dict)
|
| | | }
|
| | | })
|
| | | })
|
| | | },
|
| | | })
|
| | | }
|
| | |
| | | export function selectDictLabel(datas, value) { |
| | | var actions = []; |
| | | Object.keys(datas).some((key) => { |
| | | if (datas[key].dictValue == ('' + value)) { |
| | | actions.push(datas[key].dictLabel); |
| | | if (datas[key].value == ('' + value)) { |
| | | actions.push(datas[key].label); |
| | | return true; |
| | | } |
| | | }) |
| | |
| | | return str; |
| | | } |
| | | |
| | | // 数据合并 |
| | | export function mergeRecursive(source, target) { |
| | | for (var p in target) { |
| | | try { |
| | | if (target[p].constructor == Object) { |
| | | source[p] = mergeRecursive(source[p], target[p]); |
| | | } else { |
| | | source[p] = target[p]; |
| | | } |
| | | } catch(e) { |
| | | source[p] = target[p]; |
| | | } |
| | | } |
| | | return source; |
| | | }; |
| | | |
| | | /** |
| | | * 构造树型结构数据 |
| | | * @param {*} data 数据源 |
| | |
| | | <el-form-item label="任务组名" prop="jobGroup"> |
| | | <el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in jobGroupOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_job_group" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="任务状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_job_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="任务组名" align="center" prop="jobGroup"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/> |
| | | <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" /> |
| | |
| | | <el-form-item label="任务分组" prop="jobGroup"> |
| | | <el-select v-model="form.jobGroup" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in jobGroupOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_job_group" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="状态"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_job_status" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | export default { |
| | | components: { Crontab }, |
| | | name: "Job", |
| | | dicts: ['sys_job_group', 'sys_job_status'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | openCron: false, |
| | | // 传入的表达式 |
| | | expression: "", |
| | | // 任务组名字典 |
| | | jobGroupOptions: [], |
| | | // 状态字典 |
| | | statusOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_job_group").then(response => { |
| | | this.jobGroupOptions = response.data; |
| | | }); |
| | | this.getDicts("sys_job_status").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询定时任务列表 */ |
| | |
| | | }, |
| | | // 任务组名字典翻译 |
| | | jobGroupFormat(row, column) { |
| | | return this.selectDictLabel(this.jobGroupOptions, row.jobGroup); |
| | | return this.selectDictLabel(this.dict.type.sys_job_group, row.jobGroup); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in jobGroupOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_job_group" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_common_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="任务组名" align="center" prop="jobGroup" :show-overflow-tooltip="true"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="jobGroupOptions" :value="scope.row.jobGroup"/> |
| | | <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="执行状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="执行时间" align="center" prop="createTime" width="180"> |
| | |
| | | |
| | | export default { |
| | | name: "JobLog", |
| | | dicts: ['sys_common_status', 'sys_job_group'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | dateRange: [], |
| | | // 表单参数 |
| | | form: {}, |
| | | // 执行状态字典 |
| | | statusOptions: [], |
| | | // 任务组名字典 |
| | | jobGroupOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | } else { |
| | | this.getList(); |
| | | } |
| | | this.getDicts("sys_common_status").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | this.getDicts("sys_job_group").then(response => { |
| | | this.jobGroupOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询调度日志列表 */ |
| | |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_common_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="操作系统" align="center" prop="os" /> |
| | | <el-table-column label="登录状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作信息" align="center" prop="msg" /> |
| | |
| | | |
| | | export default { |
| | | name: "Logininfor", |
| | | dicts: ['sys_common_status'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | total: 0, |
| | | // 表格数据 |
| | | list: [], |
| | | // 状态数据字典 |
| | | statusOptions: [], |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 默认排序 |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_common_status").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询登录日志列表 */ |
| | |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in typeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_oper_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_common_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="系统模块" align="center" prop="title" /> |
| | | <el-table-column label="操作类型" align="center" prop="businessType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="typeOptions" :value="scope.row.businessType"/> |
| | | <dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="请求方式" align="center" prop="requestMethod" /> |
| | |
| | | <el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="操作状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180"> |
| | |
| | | |
| | | export default { |
| | | name: "Operlog", |
| | | dicts: ['sys_oper_type', 'sys_common_status'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | list: [], |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 类型数据字典 |
| | | typeOptions: [], |
| | | // 类型数据字典 |
| | | statusOptions: [], |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 默认排序 |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_oper_type").then(response => { |
| | | this.typeOptions = response.data; |
| | | }); |
| | | this.getDicts("sys_common_status").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询登录日志 */ |
| | |
| | | }, |
| | | // 操作日志类型字典翻译 |
| | | typeFormat(row, column) { |
| | | return this.selectDictLabel(this.typeOptions, row.businessType); |
| | | return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | |
| | | <el-form-item label="系统内置" prop="configType"> |
| | | <el-select v-model="queryParams.configType" placeholder="系统内置" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in typeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="参数键值" align="center" prop="configValue" /> |
| | | <el-table-column label="系统内置" align="center" prop="configType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="typeOptions" :value="scope.row.configType"/> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> |
| | |
| | | <el-form-item label="系统内置" prop="configType"> |
| | | <el-radio-group v-model="form.configType"> |
| | | <el-radio |
| | | v-for="dict in typeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | |
| | | |
| | | export default { |
| | | name: "Config", |
| | | dicts: ['sys_yes_no'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 类型数据字典 |
| | | typeOptions: [], |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 查询参数 |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_yes_no").then(response => { |
| | | this.typeOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询参数列表 */ |
| | |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="orderNum" label="排序" width="200"></el-table-column> |
| | | <el-table-column prop="status" label="状态" width="100"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="200"> |
| | |
| | | <el-form-item label="部门状态"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | export default { |
| | | name: "Dept", |
| | | dicts: ['sys_normal_disable'], |
| | | components: { Treeselect }, |
| | | data() { |
| | | return { |
| | |
| | | refreshTable: true, |
| | | // 是否展开 |
| | | expand: false, |
| | | // 状态数据字典 |
| | | statusOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | deptName: undefined, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_normal_disable").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询部门列表 */ |
| | |
| | | <el-form-item label="状态" prop="status">
|
| | | <el-select v-model="queryParams.status" placeholder="数据状态" clearable size="small">
|
| | | <el-option
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | <el-table-column label="字典排序" align="center" prop="dictSort" />
|
| | | <el-table-column label="状态" align="center" prop="status">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/>
|
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
| | |
| | | <el-form-item label="状态" prop="status">
|
| | | <el-radio-group v-model="form.status">
|
| | | <el-radio
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue"
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.value"
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | <el-form-item label="备注" prop="remark">
|
| | |
| | |
|
| | | export default {
|
| | | name: "Data",
|
| | | dicts: ['sys_normal_disable'],
|
| | | data() {
|
| | | return {
|
| | | // 遮罩层
|
| | |
| | | label: "危险"
|
| | | }
|
| | | ],
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 类型数据字典
|
| | | typeOptions: [],
|
| | | // 查询参数
|
| | |
| | | const dictId = this.$route.params && this.$route.params.dictId;
|
| | | this.getType(dictId);
|
| | | this.getTypeList();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | },
|
| | | methods: {
|
| | | /** 查询字典类型详细 */
|
| | |
| | | style="width: 240px"
|
| | | >
|
| | | <el-option
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | </el-table-column>
|
| | | <el-table-column label="状态" align="center" prop="status">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/>
|
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
| | |
| | | <el-form-item label="状态" prop="status">
|
| | | <el-radio-group v-model="form.status">
|
| | | <el-radio
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue"
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.value"
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | <el-form-item label="备注" prop="remark">
|
| | |
| | |
|
| | | export default {
|
| | | name: "Dict",
|
| | | dicts: ['sys_normal_disable'],
|
| | | data() {
|
| | | return {
|
| | | // 遮罩层
|
| | |
| | | title: "",
|
| | | // 是否显示弹出层
|
| | | open: false,
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 日期范围
|
| | | dateRange: [],
|
| | | // 查询参数
|
| | |
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | },
|
| | | methods: {
|
| | | /** 查询字典类型列表 */
|
| | |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="status" label="状态" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" align="center" prop="createTime"> |
| | |
| | | </span> |
| | | <el-radio-group v-model="form.visible"> |
| | | <el-radio |
| | | v-for="dict in visibleOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_show_hide" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </span> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | export default { |
| | | name: "Menu", |
| | | dicts: ['sys_show_hide', 'sys_normal_disable'], |
| | | components: { Treeselect, IconSelect }, |
| | | data() { |
| | | return { |
| | |
| | | isExpandAll: false, |
| | | // 重新渲染表格状态 |
| | | refreshTable: true, |
| | | // 显示状态数据字典 |
| | | visibleOptions: [], |
| | | // 菜单状态数据字典 |
| | | statusOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | menuName: undefined, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_show_hide").then(response => { |
| | | this.visibleOptions = response.data; |
| | | }); |
| | | this.getDicts("sys_normal_disable").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | // 选择图标 |
| | |
| | | <el-form-item label="类型" prop="noticeType"> |
| | | <el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in typeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_notice_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | /> |
| | | <el-table-column label="公告类型" align="center" prop="noticeType" width="100"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="typeOptions" :value="scope.row.noticeType"/> |
| | | <dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" align="center" prop="status" width="100"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建者" align="center" prop="createBy" width="100" /> |
| | |
| | | <el-form-item label="公告类型" prop="noticeType"> |
| | | <el-select v-model="form.noticeType" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in typeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_notice_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="状态"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_notice_status" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | export default { |
| | | name: "Notice", |
| | | dicts: ['sys_notice_status', 'sys_notice_type'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 类型数据字典 |
| | | statusOptions: [], |
| | | // 状态数据字典 |
| | | typeOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_notice_status").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | this.getDicts("sys_notice_type").then(response => { |
| | | this.typeOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询公告列表 */ |
| | |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="岗位状态" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue" |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column label="岗位排序" align="center" prop="postSort" /> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| | |
| | | <el-form-item label="岗位状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in statusOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | >{{dict.dictLabel}}</el-radio> |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | |
| | | |
| | | export default { |
| | | name: "Post", |
| | | dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 状态数据字典 |
| | | statusOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_normal_disable").then(response => { |
| | | this.statusOptions = response.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | /** 查询岗位列表 */ |
| | |
| | | <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="状态" align="center" prop="status">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/>
|
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
| | |
| | |
|
| | | export default {
|
| | | name: "AuthUser",
|
| | | dicts: ['sys_normal_disable'],
|
| | | components: { selectUser },
|
| | | data() {
|
| | | return {
|
| | |
| | | total: 0,
|
| | | // 用户表格数据
|
| | | userList: [],
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 查询参数
|
| | | queryParams: {
|
| | | pageNum: 1,
|
| | |
| | | if (roleId) {
|
| | | this.queryParams.roleId = roleId;
|
| | | this.getList();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | }
|
| | | },
|
| | | methods: {
|
| | |
| | | style="width: 240px"
|
| | | >
|
| | | <el-option
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | <el-form-item label="状态">
|
| | | <el-radio-group v-model="form.status">
|
| | | <el-radio
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue"
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.value"
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | <el-form-item label="菜单权限">
|
| | |
| | |
|
| | | export default {
|
| | | name: "Role",
|
| | | dicts: ['sys_normal_disable'],
|
| | | data() {
|
| | | return {
|
| | | // 遮罩层
|
| | |
| | | deptNodeAll: false,
|
| | | // 日期范围
|
| | | dateRange: [],
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 数据范围选项
|
| | | dataScopeOptions: [
|
| | | {
|
| | |
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | },
|
| | | methods: {
|
| | | /** 查询角色列表 */
|
| | |
| | | <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="状态" align="center" prop="status">
|
| | | <template slot-scope="scope">
|
| | | <dict-tag :options="statusOptions" :value="scope.row.status"/>
|
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
| | |
| | | <script>
|
| | | import { unallocatedUserList, authUserSelectAll } from "@/api/system/role";
|
| | | export default {
|
| | | dicts: ['sys_normal_disable'],
|
| | | props: {
|
| | | // 角色编号
|
| | | roleId: {
|
| | |
| | | total: 0,
|
| | | // 未授权用户数据
|
| | | userList: [],
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 查询参数
|
| | | queryParams: {
|
| | | pageNum: 1,
|
| | |
| | | phonenumber: undefined
|
| | | }
|
| | | };
|
| | | },
|
| | | created() {
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | },
|
| | | methods: {
|
| | | // 显示弹框
|
| | |
| | | style="width: 240px"
|
| | | >
|
| | | <el-option
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | <el-form-item label="用户性别">
|
| | | <el-select v-model="form.sex" placeholder="请选择">
|
| | | <el-option
|
| | | v-for="dict in sexOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictLabel"
|
| | | :value="dict.dictValue"
|
| | | v-for="dict in dict.type.sys_user_sex"
|
| | | :key="dict.value"
|
| | | :label="dict.label"
|
| | | :value="dict.value"
|
| | | ></el-option>
|
| | | </el-select>
|
| | | </el-form-item>
|
| | |
| | | <el-form-item label="状态">
|
| | | <el-radio-group v-model="form.status">
|
| | | <el-radio
|
| | | v-for="dict in statusOptions"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue"
|
| | | >{{dict.dictLabel}}</el-radio>
|
| | | v-for="dict in dict.type.sys_normal_disable"
|
| | | :key="dict.value"
|
| | | :label="dict.value"
|
| | | >{{dict.label}}</el-radio>
|
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | |
| | |
|
| | | export default {
|
| | | name: "User",
|
| | | dicts: ['sys_normal_disable', 'sys_user_sex'],
|
| | | components: { Treeselect },
|
| | | data() {
|
| | | return {
|
| | |
| | | initPassword: undefined,
|
| | | // 日期范围
|
| | | dateRange: [],
|
| | | // 状态数据字典
|
| | | statusOptions: [],
|
| | | // 性别状态字典
|
| | | sexOptions: [],
|
| | | // 岗位选项
|
| | | postOptions: [],
|
| | | // 角色选项
|
| | |
| | | created() {
|
| | | this.getList();
|
| | | this.getTreeselect();
|
| | | this.getDicts("sys_normal_disable").then(response => {
|
| | | this.statusOptions = response.data;
|
| | | });
|
| | | this.getDicts("sys_user_sex").then(response => {
|
| | | this.sexOptions = response.data;
|
| | | });
|
| | | this.getConfigKey("sys.user.initPassword").then(response => {
|
| | | this.initPassword = response.msg;
|
| | | });
|