Browse Source

整理所有list列表结构/增加监控中心路由/增加令牌管理

pull/2/head
gongzijian 5 years ago
parent
commit
f4dcc468c5
  1. 87
      escheduler-ui/build/i18n.js
  2. 40
      escheduler-ui/src/js/conf/home/pages/monitor/index.vue
  3. 19
      escheduler-ui/src/js/conf/home/pages/projects/index.vue
  4. 35
      escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue
  5. 5
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/create/index.vue
  6. 5
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/details/index.vue
  7. 2
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue
  8. 41
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
  9. 99
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
  10. 13
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue
  11. 27
      escheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue
  12. 24
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue
  13. 49
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue
  14. 35
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
  15. 35
      escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue
  16. 9
      escheduler-ui/src/js/conf/home/pages/resource/index.vue
  17. 122
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue
  18. 52
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
  19. 56
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue
  20. 54
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
  21. 48
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
  22. 8
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
  23. 9
      escheduler-ui/src/js/conf/home/pages/security/index.vue
  24. 46
      escheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
  25. 30
      escheduler-ui/src/js/conf/home/pages/security/pages/servers/pages/master/index.vue
  26. 26
      escheduler-ui/src/js/conf/home/pages/security/pages/servers/pages/worker/index.vue
  27. 46
      escheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue
  28. 50
      escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
  29. 46
      escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
  30. 10
      escheduler-ui/src/js/conf/home/pages/user/index.vue
  31. 16
      escheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue
  32. 16
      escheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue
  33. 152
      escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue
  34. 125
      escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue
  35. 115
      escheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue
  36. 8
      escheduler-ui/src/js/conf/home/router/index.js
  37. 14
      escheduler-ui/src/js/conf/home/store/security/actions.js
  38. 77
      escheduler-ui/src/js/conf/home/store/user/actions.js
  39. 6
      escheduler-ui/src/js/module/components/conditions/conditions.vue
  40. 4
      escheduler-ui/src/js/module/components/nav/nav.vue
  41. 0
      escheduler-ui/src/js/module/components/secondaryMenu/_source/close.png
  42. 56
      escheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
  43. 0
      escheduler-ui/src/js/module/components/secondaryMenu/_source/open.png
  44. 49
      escheduler-ui/src/js/module/components/secondaryMenu/secondaryMenu.vue
  45. 2
      escheduler-ui/src/js/module/i18n/locale/zh_CN.js
  46. 7
      escheduler-ui/src/lib/external/config.js
  47. 0
      escheduler-ui/src/lib/external/email.js
  48. 3
      escheduler-ui/src/sass/common/index.scss

87
escheduler-ui/build/i18n.js

@ -1,87 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const fs = require('fs');
const path = require('path')
const glob = require('globby')
function moduleName (modules) {
let filename = path.basename(modules)
let parts = filename.split('.')
parts.pop()
filename = parts.join('.')
return path.dirname(modules) + '/' + filename
}
const jsEntry = () => {
const obj = {}
const files = glob.sync([
'./src/js/conf/login/**/*.vue',
'./src/js/conf/login/**/*.js',
'./src/js/conf/home/**/**/**/**/**/**/**/**/*.vue',
'./src/js/conf/home/**/**/**/**/**/**/**/**/*.js',
'./src/js/module/**/**/**/**/**/*.vue',
'./src/js/module/**/**/**/**/**/*.js'
])
files.forEach(val => {
let parts = val.split(/[\\/]/)
parts.shift()
parts.shift()
let modules = parts.join('/')
let entry = moduleName(modules)
obj[entry] = val
})
return obj
}
/* eslint-disable */
let reg = /\$t\([\w,""''~\-\s.?!\+\/<>()\u4e00-\u9fa5]*\)/g
let map = {}
let entryPathList = ''
let matchPathList = ''
let jsEntryObj = jsEntry()
for (let i in jsEntryObj) {
entryPathList += jsEntryObj[i] + '\n'
let data = fs.readFileSync(path.join(jsEntryObj[i]), 'utf-8')
if (reg.test(data)) {
matchPathList += jsEntryObj[i] + '\n'
let str = data.replace(/[""'']/g, '')
str.replace(reg, function () {
if (arguments && arguments[0]) {
let key = arguments[0]
key = key.substring(3, key.length - 1)
map[key] = key
}
})
}
}
let outPath = path.join(__dirname, '../src/js/module/i18n/locale/zh_CN.js')
fs.unlink(outPath, (err) => {
if (err) {
console.error('删除zh_CN.js文件出错 -- \n', err)
} else {
console.log('删除zh_CN.js文件成功')
}
})
fs.writeFile(outPath, 'export default ' + JSON.stringify(map, null, 2), function (err) {
if (err) {
console.error('写入zh_CN.js文件出错 -- \n', err)
} else {
console.log('写入zh_CN.js文件成功')
}
})

40
escheduler-ui/src/js/conf/home/pages/monitor/index.vue

@ -0,0 +1,40 @@
<template>
<div class="index-model">
index
</div>
</template>
<script>
export default {
name: 'monitor-index',
data () {
return {}
},
props: {},
methods: {},
watch: {},
beforeCreate () {
},
created () {
},
beforeMount () {
},
mounted () {
},
beforeUpdate () {
},
updated () {
},
beforeDestroy () {
},
destroyed () {
},
computed: {},
components: {}
}
</script>
<style lang="scss" rel="stylesheet/scss">
.index-model {
}
</style>

19
escheduler-ui/src/js/conf/home/pages/projects/index.vue

@ -1,9 +1,24 @@
<template>
<router-view></router-view>
<div class="main-layout-box" :class="!isProjectsList ? '' : 'no'">
<m-secondary-menu :type="'projects'" v-if="!isProjectsList"></m-secondary-menu>
<router-view></router-view>
</div>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
export default {
name: 'projects-index'
name: 'projects-index',
data () {
return {
isProjectsList: this.$router.history.current.name === 'projects-list'
}
},
watch: {
'$route' ({ name }) {
this.isProjectsList = name === 'projects-list'
}
},
components: { mSecondaryMenu }
}
</script>

35
escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue

@ -1,25 +1,22 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="config.title">
<template slot="conditions">
<m-conditions @on-query="_onQuery"></m-conditions>
<m-list-construction :title="config.title">
<template slot="conditions">
<m-conditions @on-query="_onQuery"></m-conditions>
</template>
<template slot="content">
<template v-if="taskRecordList.length">
<m-list :task-record-list="taskRecordList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template slot="content">
<template v-if="taskRecordList.length">
<m-list :task-record-list="taskRecordList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!taskRecordList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
<template v-if="!taskRecordList.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'

5
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/create/index.vue

@ -1,8 +1,5 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-create-dag></m-create-dag>
</div>
<m-create-dag></m-create-dag>
</template>
<script>
import mCreateDag from '@/conf/home/pages/dag/index'

5
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/details/index.vue

@ -1,8 +1,5 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-definition-details></m-definition-details>
</div>
<m-definition-details></m-definition-details>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'

2
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue

@ -45,7 +45,7 @@
<script>
import _ from 'lodash'
import i18n from '@/module/i18n'
import emailList from '~/localData/email'
import emailList from '~/external/email'
import { isEmial, fuzzyQuery } from './util'
export default {

41
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue

@ -1,28 +1,25 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Process definition')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" v-ps="['GENERAL_USER']" @click="() => this.$router.push({name: 'definition-create'})">{{$t('Create process')}}</x-button>
</template>
</m-conditions>
</template>
<template slot="content">
<template v-if="processListP.length">
<m-list :process-list="processListP" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!processListP.length">
<m-no-data></m-no-data>
<m-list-construction :title="$t('Process definition')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" v-ps="['GENERAL_USER']" @click="() => this.$router.push({name: 'definition-create'})">{{$t('Create process')}}</x-button>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</m-conditions>
</template>
<template slot="content">
<template v-if="processListP.length">
<m-list :process-list="processListP" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!processListP.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'

99
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue

@ -1,59 +1,56 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('TreeView')">
<template slot="conditions"></template>
<template slot="content">
<div class="tree-view-index-model">
<div class="tree-limit-select">
<x-select v-model="limit" style="width: 70px;" @on-change="_onChangeSelect">
<x-option
v-for="city in [{value:25},{value:50},{value:75},{value:100}]"
:key="city.value"
:value="city.value"
:label="city.value">
</x-option>
</x-select>
<x-button
@click="_rtTasksDag"
v-if="$route.query.subProcessIds"
type="primary"
size="default"
icon="fa fa-reply">
{{$t('Return_1')}}
</x-button>
<m-list-construction :title="$t('TreeView')">
<template slot="conditions"></template>
<template slot="content">
<div class="tree-view-index-model">
<div class="tree-limit-select">
<x-select v-model="limit" style="width: 70px;" @on-change="_onChangeSelect">
<x-option
v-for="city in [{value:25},{value:50},{value:75},{value:100}]"
:key="city.value"
:value="city.value"
:label="city.value">
</x-option>
</x-select>
<x-button
@click="_rtTasksDag"
v-if="$route.query.subProcessIds"
type="primary"
size="default"
icon="fa fa-reply">
{{$t('Return_1')}}
</x-button>
</div>
<div class="tasks-color">
<div class="toolbar-color-sp">
<a href="javascript:">
<span>Node Type</span>
</a>
<a href="javascript:" v-for="(k,v) in tasksType">
<i class="fa fa-circle" :style="{color:k.color}"></i>
<span>{{v}}</span>
</a>
</div>
<div class="tasks-color">
<div class="toolbar-color-sp">
<a href="javascript:">
<span>Node Type</span>
</a>
<a href="javascript:" v-for="(k,v) in tasksType">
<i class="fa fa-circle" :style="{color:k.color}"></i>
<span>{{v}}</span>
</a>
</div>
<div class="state-tasks-color-sp">
<a href="javascript:">
<span>{{$t('Task Status')}}</span>
</a>
<a href="javascript:" v-for="(item) in tasksState">
<i class="fa fa-square" :style="{color:item.color}"></i>
<span>{{item.desc}}</span>
</a>
</div>
<div class="state-tasks-color-sp">
<a href="javascript:">
<span>{{$t('Task Status')}}</span>
</a>
<a href="javascript:" v-for="(item) in tasksState">
<i class="fa fa-square" :style="{color:item.color}"></i>
<span>{{item.desc}}</span>
</a>
</div>
<div class="tree-model" v-show="!isNodata">
<div class="d3-tree">
<svg class='tree' width="100%"></svg>
</div>
</div>
<div class="tree-model" v-show="!isNodata">
<div class="d3-tree">
<svg class='tree' width="100%"></svg>
</div>
<m-no-data v-if="isNodata"></m-no-data>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</div>
<m-no-data v-if="isNodata"></m-no-data>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>

13
escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue

@ -1,12 +1,9 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Cron Manage')">
<template slot="content">
<m-list></m-list>
</template>
</m-list-construction>
</div>
<m-list-construction :title="$t('Cron Manage')">
<template slot="content">
<m-list></m-list>
</template>
</m-list-construction>
</template>
<script>
import mList from './_source/list'

27
escheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue

@ -1,12 +1,9 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Project Home')">
<template slot="content">
<m-project-chart :id="id"></m-project-chart>
</template>
</m-list-construction>
</div>
<m-list-construction :title="$t('Project Home')">
<template slot="content">
<m-project-chart :id="id"></m-project-chart>
</template>
</m-list-construction>
</template>
<script>
import mProjectChart from './_source/projectChart'
@ -21,20 +18,6 @@
id: localStore.getItem('projectId') || null
}
},
props: {},
methods: {
},
watch: {},
created () {
},
mounted () {
},
components: { mSecondaryMenu, mListConstruction, mProjectChart }
}
</script>
<style lang="scss" rel="stylesheet/scss">
</style>

24
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue

@ -1,8 +1,5 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-instance-details></m-instance-details>
</div>
<m-instance-details></m-instance-details>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
@ -12,23 +9,6 @@
data () {
return {}
},
props: {},
methods: {},
watch: {},
created () {
},
mounted () {
},
updated () {
},
beforeDestroy () {
},
destroyed () {
},
computed: {},
components: { mInstanceDetails, mSecondaryMenu }
}
</script>
<style lang="scss" rel="stylesheet/scss">
</style>
</script>

49
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue

@ -1,32 +1,29 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Gantt')">
<template slot="content">
<div class="gantt-model">
<div class="gantt-state">
<div class="state-tasks-color-sp">
<a href="javascript:">
<span>{{$t('Task Status')}}</span>
</a>
<a href="javascript:" v-for="(item) in tasksState">
<i class="fa fa-square" :style="{color:item.color}"></i>
<span>{{item.desc}}</span>
</a>
</div>
<m-list-construction :title="$t('Gantt')">
<template slot="content">
<div class="gantt-model">
<div class="gantt-state">
<div class="state-tasks-color-sp">
<a href="javascript:">
<span>{{$t('Task Status')}}</span>
</a>
<a href="javascript:" v-for="(item) in tasksState">
<i class="fa fa-square" :style="{color:item.color}"></i>
<span>{{item.desc}}</span>
</a>
</div>
<template v-show="!isNodata">
<div class="gantt"></div>
</template>
<template v-if="isNodata">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading">
</m-spin>
</div>
</template>
</m-list-construction>
</div>
<template v-show="!isNodata">
<div class="gantt"></div>
</template>
<template v-if="isNodata">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading">
</m-spin>
</div>
</template>
</m-list-construction>
</template>
<script>
import { mapActions } from 'vuex'

35
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue

@ -1,25 +1,22 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Process Instance')">
<template slot="conditions">
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
<m-list-construction :title="$t('Process Instance')">
<template slot="conditions">
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
</template>
<template slot="content">
<template v-if="processInstanceList.length">
<m-list :process-instance-list="processInstanceList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template slot="content">
<template v-if="processInstanceList.length">
<m-list :process-instance-list="processInstanceList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!processInstanceList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
<template v-if="!processInstanceList.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'

35
escheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue

@ -1,25 +1,22 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'projects'"></m-secondary-menu>
<m-list-construction :title="$t('Task Instance')">
<template slot="conditions">
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
<m-list-construction :title="$t('Task Instance')">
<template slot="conditions">
<m-instance-conditions @on-query="_onQuery"></m-instance-conditions>
</template>
<template slot="content">
<template v-if="taskInstanceList.length">
<m-list :task-instance-list="taskInstanceList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template slot="content">
<template v-if="taskInstanceList.length">
<m-list :task-instance-list="taskInstanceList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!taskInstanceList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
<template v-if="!taskInstanceList.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'

9
escheduler-ui/src/js/conf/home/pages/resource/index.vue

@ -1,8 +1,13 @@
<template>
<router-view></router-view>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'"></m-secondary-menu>
<router-view></router-view>
</div>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
export default {
name: 'resource-index'
name: 'resource-index',
components: { mSecondaryMenu }
}
</script>

122
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue

@ -1,65 +1,62 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'"></m-secondary-menu>
<m-list-construction :title="$t('Create File')">
<template slot="content">
<div class="resource-create-model">
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Name')}}</template>
<template slot="content">
<x-input
type="input"
v-model="fileName"
style="width: 300px;"
:placeholder="$t('Please enter name')"
autocomplete="off">
</x-input>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Format')}}</template>
<template slot="content">
<x-select v-model="suffix" style="width: 100px;" @on-change="_onChange">
<x-option
v-for="city in fileTypeList"
:key="city"
:value="city"
:label="city">
</x-option>
</x-select>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">{{$t('Description')}}</template>
<template slot="content">
<x-input
type="textarea"
v-model="desc"
style="width: 430px;"
:placeholder="$t('Please enter description')"
autocomplete="off">
</x-input>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Content')}}</template>
<template slot="content">
<textarea id="code-create-mirror" name="code-create-mirror"></textarea>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">&nbsp;</template>
<template slot="content">
<div class="submit">
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Create')}} </x-button>
<x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('Cancel')}} </x-button>
</div>
</template>
</m-list-box-f>
</div>
</template>
</m-list-construction>
</div>
<m-list-construction :title="$t('Create File')">
<template slot="content">
<div class="resource-create-model">
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Name')}}</template>
<template slot="content">
<x-input
type="input"
v-model="fileName"
style="width: 300px;"
:placeholder="$t('Please enter name')"
autocomplete="off">
</x-input>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Format')}}</template>
<template slot="content">
<x-select v-model="suffix" style="width: 100px;" @on-change="_onChange">
<x-option
v-for="city in fileTypeList"
:key="city"
:value="city"
:label="city">
</x-option>
</x-select>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">{{$t('Description')}}</template>
<template slot="content">
<x-input
type="textarea"
v-model="desc"
style="width: 430px;"
:placeholder="$t('Please enter description')"
autocomplete="off">
</x-input>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name"><b>*</b>{{$t('File Content')}}</template>
<template slot="content">
<textarea id="code-create-mirror" name="code-create-mirror"></textarea>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">&nbsp;</template>
<template slot="content">
<div class="submit">
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Create')}} </x-button>
<x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('Cancel')}} </x-button>
</div>
</template>
</m-list-box-f>
</div>
</template>
</m-list-construction>
</template>
<script>
import i18n from '@/module/i18n'
@ -70,7 +67,6 @@
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
let editor
@ -158,7 +154,7 @@
editor.off($('.code-create-mirror'), 'keypress', this.keypress)
},
computed: {},
components: { mSecondaryMenu, mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mConditions, mSpin, mListBoxF }
}
</script>

52
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue

@ -1,34 +1,31 @@
<template>
<div class="main-layout-box file-details-model">
<m-secondary-menu :type="'resource'" ></m-secondary-menu>
<m-list-construction :title="$t('File Details')">
<div slot="content" style="margin: 20px">
<div class="file-details-content">
<h2>
<span>{{name}}</span>
<div class="down">
<i class="iconfont" data-container="body" data-toggle="tooltip" :title="$t('Download Details')" @click="_downloadFile">&#xe610;</i>
<em>{{size}}</em>
</div>
</h2>
<template v-if="isNoType">
<m-list-construction :title="$t('File Details')">
<div slot="content" style="margin: 20px">
<div class="file-details-content">
<h2>
<span>{{name}}</span>
<div class="down">
<i class="iconfont" data-container="body" data-toggle="tooltip" :title="$t('Download Details')" @click="_downloadFile">&#xe610;</i>
<em>{{size}}</em>
</div>
</h2>
<template v-if="isNoType">
<div class="code-mirror-model" v-if="!msg">
<textarea id="code-details-mirror" name="code-details-mirror"></textarea>
</div>
<div class="code-mirror-model" v-if="!msg">
<textarea id="code-details-mirror" name="code-details-mirror"></textarea>
</div>
<m-no-data :msg="msg" v-if="msg"></m-no-data>
<m-no-data :msg="msg" v-if="msg"></m-no-data>
</template>
<template v-if="!isNoType">
<m-no-type></m-no-type>
</template>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
</template>
<template v-if="!isNoType">
<m-no-type></m-no-type>
</template>
</div>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -42,7 +39,6 @@
import mSpin from '@/module/components/spin/spin'
import localStore from '@/module/util/localStorage'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
let editor
@ -202,7 +198,7 @@
}
}
},
components: { mListConstruction, mNoType, mSpin, mSecondaryMenu, mNoData }
components: { mListConstruction, mNoType, mSpin, mNoData }
}
</script>

56
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue

@ -1,34 +1,31 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'" ></m-secondary-menu>
<m-list-construction :title="$t('File Details')">
<div slot="content" style="margin: 20px">
<div class="file-edit-content">
<h2>
<span>{{name}}</span>
</h2>
<template v-show="isNoType">
<template v-if="!msg">
<div class="code-mirror-model">
<textarea id="code-edit-mirror" name="code-edit-mirror"></textarea>
</div>
<div class="submit-c">
<x-button type="text" shape="circle" @click="close()" :disabled="disabled"> {{$t('Return')}} </x-button>
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('Save')}} </x-button>
</div>
</template>
<m-no-data :msg="msg" v-if="msg"></m-no-data>
</template>
<template v-if="!isNoType">
<m-no-type></m-no-type>
<m-list-construction :title="$t('File Details')">
<div slot="content" style="margin: 20px">
<div class="file-edit-content">
<h2>
<span>{{name}}</span>
</h2>
<template v-show="isNoType">
<template v-if="!msg">
<div class="code-mirror-model">
<textarea id="code-edit-mirror" name="code-edit-mirror"></textarea>
</div>
<div class="submit-c">
<x-button type="text" shape="circle" @click="close()" :disabled="disabled"> {{$t('Return')}} </x-button>
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('Save')}} </x-button>
</div>
</template>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
<m-no-data :msg="msg" v-if="msg"></m-no-data>
</template>
<template v-if="!isNoType">
<m-no-type></m-no-type>
</template>
</div>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -41,7 +38,6 @@
import localStore from '@/module/util/localStorage'
import mNoData from '@/module/components/noData/noData'
import { handlerSuffix } from '../details/_source/utils'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
let editor
@ -158,7 +154,7 @@
},
computed: {
},
components: { mListConstruction, mNoType, mSpin, mSecondaryMenu, mNoData }
components: { mListConstruction, mNoType, mSpin, mNoData }
}
</script>

54
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue

@ -1,33 +1,30 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'"></m-secondary-menu>
<m-list-construction :title="$t('File Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button-group size="small" >
<x-button type="ghost" @click="() => $router.push({name: 'resource-file-create'})" v-ps="['GENERAL_USER']">{{$t('Create File')}}</x-button>
<x-button type="ghost" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload Files')}}</x-button>
</x-button-group>
</template>
</m-conditions>
</template>
<template slot="content">
<template v-if="fileResourcesList.length">
<m-list :file-resources-list="fileResourcesList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!fileResourcesList.length">
<m-no-data></m-no-data>
<m-list-construction :title="$t('File Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button-group size="small" >
<x-button type="ghost" @click="() => $router.push({name: 'resource-file-create'})" v-ps="['GENERAL_USER']">{{$t('Create File')}}</x-button>
<x-button type="ghost" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload Files')}}</x-button>
</x-button-group>
</template>
<m-spin :is-spin="isLoading">
</m-spin>
</m-conditions>
</template>
<template slot="content">
<template v-if="fileResourcesList.length">
<m-list :file-resources-list="fileResourcesList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!fileResourcesList.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -38,7 +35,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -100,6 +96,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mListConstruction, mConditions, mList, mSpin, mNoData }
components: { mListConstruction, mConditions, mList, mSpin, mNoData }
}
</script>

48
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue

@ -1,30 +1,27 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'"></m-secondary-menu>
<m-list-construction :title="$t('UDF Function')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" @click="_create" v-ps="['GENERAL_USER']" size="small" >{{$t('Create UDF Function')}}</x-button>
</template>
</m-conditions>
</template>
<template slot="content">
<template v-if="udfFuncList.length">
<m-list :udf-func-list="udfFuncList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize" @on-update="_updateList">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!udfFuncList.length">
<m-no-data></m-no-data>
<m-list-construction :title="$t('UDF Function')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" @click="_create" v-ps="['GENERAL_USER']" size="small" >{{$t('Create UDF Function')}}</x-button>
</template>
<m-spin :is-spin="isLoading">
</m-spin>
</m-conditions>
</template>
<template slot="content">
<template v-if="udfFuncList.length">
<m-list :udf-func-list="udfFuncList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize" @on-update="_updateList">
</m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!udfFuncList.length">
<m-no-data></m-no-data>
</template>
</m-list-construction>
</div>
<m-spin :is-spin="isLoading">
</m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -35,7 +32,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -116,6 +112,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mListConstruction, mConditions, mList, mSpin, mCreateUdf, mNoData }
components: { mListConstruction, mConditions, mList, mSpin, mCreateUdf, mNoData }
}
</script>

8
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue

@ -1,7 +1,5 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'resource'"></m-secondary-menu>
<m-list-construction :title="$t('UDF Resources')">
<m-list-construction :title="$t('UDF Resources')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
@ -24,7 +22,6 @@
</m-spin>
</template>
</m-list-construction>
</div>
</template>
<script>
import _ from 'lodash'
@ -35,7 +32,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -98,6 +94,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mListConstruction, mConditions, mList, mSpin, mNoData }
components: { mListConstruction, mConditions, mList, mSpin, mNoData }
}
</script>

9
escheduler-ui/src/js/conf/home/pages/security/index.vue

@ -1,8 +1,13 @@
<template>
<router-view></router-view>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<router-view></router-view>
</div>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
export default {
name: 'security-index'
name: 'security-index',
components: { mSecondaryMenu }
}
</script>

46
escheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue

@ -1,30 +1,25 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<template>
<m-list-construction :title="$t('Queue manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create queue')}}</x-button>
</template>
</m-conditions>
<m-list-construction :title="$t('Queue manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create queue')}}</x-button>
</template>
<template slot="content">
<template v-if="queueList.length">
<m-list :queue-list="queueList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!queueList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</m-conditions>
</template>
<template slot="content">
<template v-if="queueList.length">
<m-list :queue-list="queueList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!queueList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -35,7 +30,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -116,6 +110,6 @@
mounted () {
},
components: { mSecondaryMenu, mList, mListConstruction, mConditions, mSpin, mNoData }
components: { mList, mListConstruction, mConditions, mSpin, mNoData }
}
</script>

30
escheduler-ui/src/js/conf/home/pages/security/pages/servers/pages/master/index.vue

@ -1,26 +1,22 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<m-list-construction :title="$t('Service-Master')">
<template slot="content">
<template v-if="masterList.length">
<m-list :list="masterList"></m-list>
</template>
<template v-if="!masterList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading" ></m-spin>
<m-list-construction :title="$t('Service-Master')">
<template slot="content">
<template v-if="masterList.length">
<m-list :list="masterList"></m-list>
</template>
</m-list-construction>
</div>
<template v-if="!masterList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading" ></m-spin>
</template>
</m-list-construction>
</template>
<script>
import { mapActions } from 'vuex'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mSpin from '@/module/components/spin/spin'
import mList from '../../_source/list'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'servers-master',
@ -48,6 +44,6 @@
},
mounted () {
},
components: { mList, mListConstruction, mSpin, mNoData, mSecondaryMenu }
components: { mList, mListConstruction, mSpin, mNoData }
}
</script>

26
escheduler-ui/src/js/conf/home/pages/security/pages/servers/pages/worker/index.vue

@ -1,25 +1,21 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<m-list-construction :title="$t('Service-Worker')">
<template slot="content">
<template v-if="workerList.length">
<m-list :list="workerList"></m-list>
</template>
<template v-if="!workerList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading" ></m-spin>
<m-list-construction :title="$t('Service-Worker')">
<template slot="content">
<template v-if="workerList.length">
<m-list :list="workerList"></m-list>
</template>
</m-list-construction>
</div>
<template v-if="!workerList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading" ></m-spin>
</template>
</m-list-construction>
</template>
<script>
import { mapActions } from 'vuex'
import mList from '../../_source/list'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -48,6 +44,6 @@
},
mounted () {
},
components: { mList, mListConstruction, mSpin, mNoData, mSecondaryMenu }
components: { mList, mListConstruction, mSpin, mNoData }
}
</script>

46
escheduler-ui/src/js/conf/home/pages/security/pages/tenement/index.vue

@ -1,30 +1,25 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<template>
<m-list-construction :title="$t('Tenant Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create Tenant')}}</x-button>
</template>
</m-conditions>
<m-list-construction :title="$t('Tenant Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create Tenant')}}</x-button>
</template>
<template slot="content">
<template v-if="tenementList.length">
<m-list :tenement-list="tenementList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!tenementList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</m-conditions>
</template>
<template slot="content">
<template v-if="tenementList.length">
<m-list :tenement-list="tenementList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!tenementList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -35,7 +30,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -115,6 +109,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mList, mListConstruction, mConditions, mSpin, mNoData }
components: { mList, mListConstruction, mConditions, mSpin, mNoData }
}
</script>

50
escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue

@ -1,30 +1,25 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<template>
<m-list-construction :title="$t('User Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create User')}}</x-button>
</template>
</m-conditions>
<m-list-construction :title="$t('User Manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create User')}}</x-button>
</template>
<template slot="content">
<template v-if="userList.length">
<m-list :user-list="userList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!userList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</m-conditions>
</template>
<template slot="content">
<template v-if="userList.length">
<m-list :user-list="userList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!userList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -35,7 +30,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -55,7 +49,7 @@
mixins: [listUrlParamHandle],
props: {},
methods: {
...mapActions('security', ['getUsersList']),
...mapActions('security', ['getUsersListP']),
/**
* Query
*/
@ -94,7 +88,7 @@
},
_getList (flag) {
this.isLoading = !flag
this.getUsersList(this.searchParams).then(res => {
this.getUsersListP(this.searchParams).then(res => {
this.userList = []
this.userList = res.totalList
this.total = res.total
@ -115,6 +109,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mList, mListConstruction, mConditions, mSpin, mNoData }
components: { mList, mListConstruction, mConditions, mSpin, mNoData }
}
</script>

46
escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue

@ -1,30 +1,25 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'security'"></m-secondary-menu>
<template>
<m-list-construction :title="'Warning group manage'">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create alarm group')}}</x-button>
</template>
</m-conditions>
<m-list-construction :title="$t('Warning group manage')">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create alarm group')}}</x-button>
</template>
<template slot="content">
<template v-if="alertgroupList.length">
<m-list :alertgroup-list="alertgroupList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!alertgroupList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</m-conditions>
</template>
<template slot="content">
<template v-if="alertgroupList.length">
<m-list :alertgroup-list="alertgroupList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!alertgroupList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</div>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
@ -35,7 +30,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -115,6 +109,6 @@
},
mounted () {
},
components: { mSecondaryMenu, mList, mListConstruction, mConditions, mSpin, mNoData }
components: { mList, mListConstruction, mConditions, mSpin, mNoData }
}
</script>

10
escheduler-ui/src/js/conf/home/pages/user/index.vue

@ -1,8 +1,14 @@
<template>
<router-view></router-view>
<div class="main-layout-box">
<m-secondary-menu :type="'user'"></m-secondary-menu>
<router-view></router-view>
</div>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
export default {
name: 'user-index'
name: 'user-index',
components: { mSecondaryMenu }
}
</script>

16
escheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue

@ -1,20 +1,16 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'user'"></m-secondary-menu>
<m-list-construction :title="$t('User Information')">
<template slot="content">
<m-info></m-info>
</template>
</m-list-construction>
</div>
<m-list-construction :title="$t('User Information')">
<template slot="content">
<m-info></m-info>
</template>
</m-list-construction>
</template>
<script>
import mInfo from './_source/info'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'account-index',
components: { mSecondaryMenu, mListConstruction, mInfo }
components: { mListConstruction, mInfo }
}
</script>

16
escheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue

@ -1,20 +1,16 @@
<template>
<div class="main-layout-box">
<m-secondary-menu :type="'user'"></m-secondary-menu>
<m-list-construction :title="$t('Edit Password')">
<template slot="content">
<m-info></m-info>
</template>
</m-list-construction>
</div>
<m-list-construction :title="$t('Edit Password')">
<template slot="content">
<m-info></m-info>
</template>
</m-list-construction>
</template>
<script>
import mInfo from './_source/info'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'password-index',
components: { mSecondaryMenu, mListConstruction, mInfo }
components: { mListConstruction, mInfo }
}
</script>

152
escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue

@ -0,0 +1,152 @@
<template>
<m-popup
ref="popup"
:ok-text="item ? $t('Edit') : $t('Submit')"
:nameText="item ? '编辑令牌' : '创建令牌'"
@ok="_ok">
<template slot="content">
<div class="create-token-model">
<m-list-box-f>
<template slot="name"><b>*</b>失效时间</template>
<template slot="content">
<x-datepicker
:disabled-date="disabledDate"
v-model="expireTime"
@on-change="_onChange"
format="YYYY-MM-DD HH:mm:ss"
:panelNum="1">
</x-datepicker>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name"><b>*</b>用户</template>
<template slot="content">
<x-select v-model="userId" @on-change="_onChange">
<x-option
v-for="city in userIdList"
:key="city.id"
:value="city.id"
:label="city.userName">
</x-option>
</x-select>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">Token</template>
<template slot="content">
<x-input
readonly
style="width: 330px;"
type="input"
v-model="token"
placeholder="请输入Token">
</x-input>
<x-button type="ghost" @click="_generateToken" :loading="tokenLoading">生成Token</x-button>
</template>
</m-list-box-f>
</div>
</template>
</m-popup>
</template>
<script>
import _ from 'lodash'
import dayjs from 'dayjs'
// import i18n from '@/module/i18n'
import store from '@/conf/home/store'
import mPopup from '@/module/components/popup/popup'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
export default {
name: 'create-token',
data () {
return {
store,
expireTime: dayjs().format('YYYY-MM-DD 23:59:59'),
userId: null,
disabledDate: date => (date.getTime() - new Date(new Date().getTime() - 24 * 60 * 60 * 1000)) < 0,
token: '',
userIdList: [],
tokenLoading: false
}
},
props: {
item: Object
},
methods: {
_ok () {
if (this._verification()) {
this._submit()
}
},
_verification () {
if (!this.token) {
this.$message.warning('请生成Token')
return false
}
return true
},
_submit () {
let param = {
expireTime: dayjs(this.expireTime).format('YYYY-MM-DD HH:mm:ss'),
userId: this.userId,
token: this.token
}
if (this.item) {
param.id = this.item.id
}
this.$refs['popup'].spinnerLoading = true
this.store.dispatch(`user/${this.item ? 'updateToken' : 'createToken'}`, param).then(res => {
this.$emit('onUpdate')
this.$message.success(res.msg)
setTimeout(() => {
this.$refs['popup'].spinnerLoading = false
}, 800)
}).catch(e => {
this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false
})
},
_generateToken () {
this.tokenLoading = true
this.store.dispatch(`user/generateToken`, {
userId: this.userId,
expireTime: this.expireTime
}).then(res => {
setTimeout(() => {
this.tokenLoading = false
this.token = res
}, 1200)
}).catch(e => {
this.token = ''
this.$message.error(e.msg || '')
this.tokenLoading = false
})
},
_onChange () {
this.token = ''
}
},
watch: {},
created () {
this.store.dispatch(`security/getUsersList`).then(res => {
this.userIdList = _.map(res, v => _.pick(v, ['id', 'userName']))
if (this.item) {
this.expireTime = this.item.expireTime
this.userId = this.item.userId
this.token = this.item.token
} else {
this.userId = this.userIdList[0].id
}
})
},
mounted () {
},
components: { mPopup, mListBoxF }
}
</script>
<style lang="scss" rel="stylesheet/scss">
.create-token-model {
width: 640px;
}
</style>

125
escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue

@ -0,0 +1,125 @@
<template>
<div class="list-model">
<div class="table-box">
<table>
<tr>
<th>
<span>编号</span>
</th>
<th>
<span>用户</span>
</th>
<th>
<span>Token</span>
</th>
<th>
<span>开始时间</span>
</th>
<th>
<span>失效时间</span>
</th>
<th>
<span>创建时间</span>
</th>
<th>
<span>更新时间</span>
</th>
<th width="120">
<span>{{$t('Operation')}}</span>
</th>
</tr>
<tr v-for="(item, $index) in list" :key="$index">
<td>
<span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
</td>
<td>
<span>
<a href="javascript:" class="links">{{item.userName}}</a>
</span>
</td>
<td><span>{{item.token}}</span></td>
<td>
<span>{{item.createTime | formatDate}}</span>
</td>
<td>
<span>{{item.expireTime | formatDate}}</span>
</td>
<td><span>{{item.createTime | formatDate}}</span></td>
<td><span>{{item.updateTime | formatDate}}</span></td>
<td>
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" icon="iconfont icon-bianjixiugai" :title="$t('Edit')" @click="_edit(item)">
</x-button>
<x-poptip
:ref="'poptip-delete-' + $index"
placement="bottom-end"
width="90">
<p>{{$t('Delete?')}}</p>
<div style="text-align: right; margin: 0;padding-top: 4px;">
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
</div>
<template slot="reference">
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" icon="iconfont icon-shanchu" :title="$t('delete')">
</x-button>
</template>
</x-poptip>
</td>
</tr>
</table>
</div>
</div>
</template>
<script>
import { mapActions } from 'vuex'
import '@/module/filter/formatDate'
import { findComponentDownward } from '@/module/util/'
export default {
name: 'token-list',
data () {
return {
list: []
}
},
props: {
tokenList: Array,
pageNo: Number,
pageSize: Number
},
methods: {
...mapActions('user', ['deleteToken']),
_closeDelete (i) {
this.$refs[`poptip-delete-${i}`][0].doClose()
},
_delete (item, i) {
this.deleteToken({
id: item.id
}).then(res => {
this.$refs[`poptip-delete-${i}`][0].doClose()
this.list.splice(i, 1)
this.$message.success(res.msg)
}).catch(e => {
this.$refs[`poptip-delete-${i}`][0].doClose()
this.$message.error(e.msg || '')
})
},
_edit (item) {
findComponentDownward(this.$root, 'token-index')._create(item)
}
},
watch: {
tokenList (a) {
this.list = []
setTimeout(() => {
this.list = a
})
}
},
created () {
this.list = this.tokenList
},
mounted () {
},
components: { }
}
</script>

115
escheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue

@ -0,0 +1,115 @@
<template>
<m-list-construction :title="'令牌管理'">
<template slot="conditions">
<m-conditions @on-conditions="_onConditions">
<template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')">创建令牌</x-button>
</template>
</m-conditions>
</template>
<template slot="content">
<template v-if="tokenList.length">
<m-list :token-list="tokenList" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list>
<div class="page-box">
<x-page :current="parseInt(searchParams.pageNo)" :total="total" :page-size="searchParams.pageSize" show-elevator @on-change="_page"></x-page>
</div>
</template>
<template v-if="!tokenList.length">
<m-no-data></m-no-data>
</template>
<m-spin :is-spin="isLoading"></m-spin>
</template>
</m-list-construction>
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import mList from './_source/list'
import mSpin from '@/module/components/spin/spin'
import mCreateToken from './_source/createToken'
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'token-index',
data () {
return {
total: null,
isLoading: false,
tokenList: [],
searchParams: {
pageSize: 10,
pageNo: 1,
searchVal: ''
}
}
},
mixins: [listUrlParamHandle],
props: {},
methods: {
...mapActions('user', ['getTokenListP']),
/**
* Inquire
*/
_onConditions (o) {
this.searchParams = _.assign(this.searchParams, o)
this.searchParams.pageNo = 1
},
_page (val) {
this.searchParams.pageNo = val
},
_create (item) {
let self = this
let modal = this.$modal.dialog({
closable: false,
showMask: true,
escClose: true,
className: 'v-modal-custom',
transitionName: 'opacityp',
render (h) {
return h(mCreateToken, {
on: {
onUpdate () {
self._debounceGET('false')
modal.remove()
},
close () {
modal.remove()
}
},
props: {
item: item
}
})
}
})
},
_getList (flag) {
this.isLoading = !flag
this.getTokenListP(this.searchParams).then(res => {
this.tokenList = []
this.tokenList = res.totalList
this.total = res.total
this.isLoading = false
}).catch(e => {
this.isLoading = false
})
}
},
watch: {
// router
'$route' (a) {
// url no params get instance list
this.searchParams.pageNo = _.isEmpty(a.query) ? 1 : a.query.pageNo
}
},
created () {
},
mounted () {
},
components: { mSecondaryMenu, mList, mListConstruction, mConditions, mSpin, mNoData }
}
</script>

8
escheduler-ui/src/js/conf/home/router/index.js

@ -375,6 +375,14 @@ const router = new Router({
meta: {
title: `${i18n.$t('Edit password')}`
}
},
{
path: '/user/token',
name: 'token',
component: resolve => require(['../pages/user/pages/token/index'], resolve),
meta: {
title: `令牌管理`
}
}
]
}

14
escheduler-ui/src/js/conf/home/store/security/actions.js

@ -90,7 +90,7 @@ export default {
* @param "searchVal":string,
* @param "pageSize":int
*/
getUsersList ({ state }, payload) {
getUsersListP ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`users/list-paging`, payload, res => {
resolve(res.data)
@ -99,6 +99,18 @@ export default {
})
})
},
/**
* Paging query user list
*/
getUsersList ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`users/list`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
/**
* Update user
* @param "id":int,

77
escheduler-ui/src/js/conf/home/store/user/actions.js

@ -42,5 +42,82 @@ export default {
}).catch(e => {
console.log(e)
})
},
/**
* get token list
* User loginUser,
* Integer pageNo,
* String searchVal,
* Integer pageSize
*/
getTokenListP ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`access-token/list-paging`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
/**
* create token
* User loginUser,
* int userId,
* String expireTime,
* String token
*/
createToken ({ state }, payload) {
return new Promise((resolve, reject) => {
io.post(`access-token/create`, payload, res => {
resolve(res)
}).catch(e => {
reject(e)
})
})
},
/**
* update token
* User loginUser,
* int userId,
* String expireTime,
* String token
*/
updateToken ({ state }, payload) {
return new Promise((resolve, reject) => {
io.post(`access-token/update`, payload, res => {
resolve(res)
}).catch(e => {
reject(e)
})
})
},
/**
* create token
* User loginUser,
* int userId,
* String expireTime
*/
generateToken ({ state }, payload) {
return new Promise((resolve, reject) => {
io.post(`access-token/generate`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
/**
* delete token
* User loginUser,
* int id
*/
deleteToken ({ state }, payload) {
return new Promise((resolve, reject) => {
io.post(`access-token/delete`, payload, res => {
resolve(res)
}).catch(e => {
reject(e)
})
})
}
}

6
escheduler-ui/src/js/module/components/conditions/conditions.vue

@ -53,6 +53,12 @@
return this.$slots['search-group']
}
},
created () {
// Routing parameter merging
if (!_.isEmpty(this.$route.query)) {
this.searchVal = this.$route.query.searchVal || ''
}
},
components: {}
}
</script>

4
escheduler-ui/src/js/module/components/nav/nav.vue

@ -32,13 +32,13 @@
</router-link>
</div>
</div>
<!--<div class="clearfix list">
<div class="clearfix list">
<div class="nav-links">
<router-link :to="{ path: '/monitor'}" tag="a" active-class="active">
<span><i class="iconfont">&#xe65f;</i>监控中心</span><b></b>
</router-link>
</div>
</div>-->
</div>
<div class="clearfix list" >
<div class="nav-links">
<router-link :to="{ path: '/security'}" tag="a" active-class="active" v-ps="['ADMIN_USER']">

0
escheduler-ui/src/js/module/components/secondaryMenu/close.png → escheduler-ui/src/js/module/components/secondaryMenu/_source/close.png

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

56
escheduler-ui/src/js/module/components/secondaryMenu/menu.js → escheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js

@ -16,6 +16,9 @@
*/
import i18n from '@/module/i18n'
import config from '~/external/config'
import Permissions from '@/module/permissions'
let menu = {
projects: [
{
@ -23,6 +26,7 @@ let menu = {
id: 1,
path: 'projects-index',
isOpen: true,
disabled: true,
icon: 'fa-home',
children: []
},
@ -31,32 +35,38 @@ let menu = {
id: 2,
path: '',
isOpen: true,
disabled: true,
icon: 'fa-gear',
children: [
{
name: `${i18n.$t('Process definition')}`,
path: 'definition',
id: 1
id: 1,
disabled: true
},
{
name: `${i18n.$t('Process Instance')}`,
path: 'instance',
id: 2
id: 2,
disabled: true
},
{
name: `${i18n.$t('Task Instance')}`,
path: 'task-instance',
id: 3
id: 3,
disabled: true
},
{
name: `${i18n.$t('Task record')}`,
path: 'task-record',
id: 4
id: 4,
disabled: config.recordSwitch
},
{
name: `${i18n.$t('History task record')}`,
path: 'history-task-record',
id: 5
id: 5,
disabled: config.recordSwitch
}
]
}
@ -68,6 +78,7 @@ let menu = {
id: 1,
path: 'tenement-manage',
isOpen: true,
disabled: true,
icon: 'fa-users',
children: []
},
@ -76,6 +87,7 @@ let menu = {
id: 1,
path: 'users-manage',
isOpen: true,
disabled: true,
icon: 'fa-user-circle',
children: []
},
@ -84,6 +96,7 @@ let menu = {
id: 1,
path: 'warning-groups-manage',
isOpen: true,
disabled: true,
icon: 'fa-warning',
children: []
},
@ -92,6 +105,7 @@ let menu = {
id: 1,
path: 'queue-manage',
isOpen: true,
disabled: true,
icon: 'fa-recycle',
children: []
},
@ -100,17 +114,20 @@ let menu = {
id: 1,
path: '',
isOpen: true,
disabled: true,
icon: 'fa-server',
children: [
{
name: 'master',
path: 'servers-master',
id: 1
id: 1,
disabled: true
},
{
name: 'worker',
path: 'servers-worker',
id: 2
id: 2,
disabled: true
}
]
}
@ -123,7 +140,7 @@ let menu = {
isOpen: true,
icon: 'fa-files-o',
children: [],
disabled: false
disabled: true
},
{
name: `${i18n.$t('UDF manage')}`,
@ -131,17 +148,19 @@ let menu = {
path: '',
isOpen: true,
icon: 'fa-file-text',
disabled: false,
disabled: true,
children: [
{
name: `${i18n.$t('Resource manage')}`,
path: 'resource-udf-resource',
id: 1
id: 1,
disabled: true
},
{
name: `${i18n.$t('Function manage')}`,
path: 'resource-udf-function',
id: 2
id: 2,
disabled: true
}
]
}
@ -149,12 +168,12 @@ let menu = {
user: [
{
name: `${i18n.$t('User Information')}`,
id: 1,
id: 0,
path: 'account',
isOpen: true,
icon: 'fa-user',
children: [],
disabled: false
disabled: true
},
{
name: `${i18n.$t('Edit password')}`,
@ -163,7 +182,16 @@ let menu = {
isOpen: true,
icon: 'fa-key',
children: [],
disabled: false
disabled: true
},
{
name: `令牌管理`,
id: 2,
path: 'token',
isOpen: true,
icon: 'fa-file-text',
children: [],
disabled: !Permissions.getAuth()
}
]
}

0
escheduler-ui/src/js/module/components/secondaryMenu/open.png → escheduler-ui/src/js/module/components/secondaryMenu/_source/open.png

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

49
escheduler-ui/src/js/module/components/secondaryMenu/secondaryMenu.vue

@ -3,11 +3,21 @@
<div class="toogle-box">
<a href="javascript:" class="tog-close" @click="_toggleMenu" v-if="!isTogHide"></a>
<a href="javascript:" class="tog-open" @click="_toggleMenu" v-if="isTogHide"></a>
<!--<a href="javascriipt:" @click="_toggleMenu"><i class="iconfont">{{isTogHide ?'&#xeef5;' : '&#xe652;'}}</i></a>-->
</div>
<div class="leven-1" v-for="(item,$index) in menuList">
<template v-if="item.path">
<router-link :to="{ name: item.path}">
<div v-if="item.disabled">
<template v-if="item.path">
<router-link :to="{ name: item.path}">
<div class="name" @click="_toggleSubMenu(item)">
<a href="javascript:">
<i class="fa icon" :class="item.icon"></i>
<span>{{item.name}}</span>
<i class="fa angle" :class="item.isOpen ? 'fa-angle-down' : 'fa-angle-right'" v-if="item.children.length"></i>
</a>
</div>
</router-link>
</template>
<template v-if="!item.path">
<div class="name" @click="_toggleSubMenu(item)">
<a href="javascript:">
<i class="fa icon" :class="item.icon"></i>
@ -15,27 +25,20 @@
<i class="fa angle" :class="item.isOpen ? 'fa-angle-down' : 'fa-angle-right'" v-if="item.children.length"></i>
</a>
</div>
</router-link>
</template>
<template v-if="!item.path">
<div class="name" @click="_toggleSubMenu(item)">
<a href="javascript:">
<i class="fa icon" :class="item.icon"></i>
<span>{{item.name}}</span>
<i class="fa angle" :class="item.isOpen ? 'fa-angle-down' : 'fa-angle-right'" v-if="item.children.length"></i>
</a>
</div>
</template>
<ul v-if="item.isOpen && item.children.length">
<router-link :to="{ name: el.path}" tag="li" active-class="active" v-for="(el,index) in item.children">
<span>{{el.name}}</span>
</router-link>
</ul>
</template>
<ul v-if="item.isOpen && item.children.length">
<template v-for="(el,index) in item.children">
<router-link :to="{ name: el.path}" tag="li" active-class="active" v-if="el.disabled">
<span>{{el.name}}</span>
</router-link>
</template>
</ul>
</div>
</div>
</div>
</template>
<script>
import menu from './menu'
import menu from './_source/menu'
export default {
name: 'secondary-menu',
@ -94,13 +97,13 @@
.tog-close {
width: 12px;
height: 102px;
background: url("./close.png") no-repeat;
background: url("./_source/close.png") no-repeat;
display: inline-block;
}
.tog-open {
width: 12px;
height: 102px;
background: url("./open.png") no-repeat;
background: url("./_source/open.png") no-repeat;
display: inline-block;
position: absolute;
right: -12px;
@ -114,7 +117,7 @@
line-height: 40px;
display: block;
position: relative;
padding-left: 12px;
padding-left: 10px;
>.icon {
vertical-align: middle;
font-size: 15px;

2
escheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -410,5 +410,5 @@ export default {
'History task record': '历史任务记录',
'Please go online': '不要忘记上线',
'Queue value': '队列值',
'Please enter queue value': '请输入队列值',
'Please enter queue value': '请输入队列值'
}

7
escheduler-ui/src/lib/external/config.js vendored

@ -0,0 +1,7 @@
/**
* project external config
*/
export default {
// qianfan task record switch
recordSwitch:true
}

0
escheduler-ui/src/lib/localData/email.js → escheduler-ui/src/lib/external/email.js vendored

3
escheduler-ui/src/sass/common/index.scss

@ -129,6 +129,9 @@ body{
.main-layout-box {
padding-left: 200px;
&.no {
padding-left: 0;
}
}
.tooltip-cont-model {

Loading…
Cancel
Save