Browse Source

admin support project,datasource and resource operation

pull/2/head
qiaozhanwei 6 years ago
parent
commit
947f3ade4c
  1. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/config.js
  2. 20
      escheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  3. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  4. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js
  5. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
  6. 4
      escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue
  7. 2
      escheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
  8. 15
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
  9. 2
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue
  10. 2
      escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
  11. 8
      escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  12. 6
      escheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue
  13. 2
      escheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
  14. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue
  15. 12
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue
  16. 4
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
  17. 8
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/list.vue
  18. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
  19. 9
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue
  20. 2
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue
  21. 9
      escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
  22. 10
      escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue
  23. 4
      escheduler-ui/src/js/module/mixin/disabledState.js

2
escheduler-ui/src/js/conf/home/pages/dag/_source/config.js

@ -26,7 +26,7 @@ import Permissions from '@/module/permissions'
* @desc tooltip * @desc tooltip
*/ */
const toolOper = (dagThis) => { const toolOper = (dagThis) => {
let disabled = Permissions.getAuth() === false ? false : !dagThis.$store.state.dag.isDetails let disabled =!dagThis.$store.state.dag.isDetails// Permissions.getAuth() === false ? false : !dagThis.$store.state.dag.isDetails
return [ return [
{ {
code: 'pointer', code: 'pointer',

20
escheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@ -8,7 +8,7 @@
:id="v" :id="v"
v-for="(item,v) in tasksTypeList" v-for="(item,v) in tasksTypeList"
@mousedown="_getDagId(v)"> @mousedown="_getDagId(v)">
<div data-toggle="tooltip" :title="item.desc" :class="_isDetails"> <div data-toggle="tooltip" :title="item.desc">
<div class="icos" :class="'icos-' + v" ></div> <div class="icos" :class="'icos-' + v" ></div>
</div> </div>
</div> </div>
@ -68,10 +68,9 @@
type="primary" type="primary"
size="xsmall" size="xsmall"
:loading="spinnerLoading" :loading="spinnerLoading"
v-ps="['GENERAL_USER']"
@click="_saveChart" @click="_saveChart"
icon="fa fa-save" icon="fa fa-save"
:disabled="isDetails"> >
{{spinnerLoading ? 'Loading...' : $t('Save')}} {{spinnerLoading ? 'Loading...' : $t('Save')}}
</x-button> </x-button>
</div> </div>
@ -205,9 +204,9 @@
* @param item * @param item
*/ */
_getDagId (v) { _getDagId (v) {
if (this.isDetails) { // if (this.isDetails) {
return // return
} // }
this.dagBarId = v this.dagBarId = v
}, },
/** /**
@ -239,11 +238,12 @@
}) })
}, },
_operationClass (item) { _operationClass (item) {
if (item.disable) {
return this.toolOperCode === item.code ? 'active' : '' return this.toolOperCode === item.code ? 'active' : ''
} else { // if (item.disable) {
return 'disable' // return this.toolOperCode === item.code ? 'active' : ''
} // } else {
// return 'disable'
// }
}, },
/** /**
* Storage interface * Storage interface

2
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@ -165,7 +165,7 @@
<div class="bottom-box"> <div class="bottom-box">
<div class="submit" style="background: #fff;"> <div class="submit" style="background: #fff;">
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button> <x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" :disabled="isDetails" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Confirm add')}} </x-button> <x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" :disabled="isDetails">{{spinnerLoading ? 'Loading...' : $t('Confirm add')}} </x-button>
</div> </div>
</div> </div>
</div> </div>

2
escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js

@ -71,7 +71,7 @@ JSP.prototype.init = function ({ dag, instance }) {
this.setConfig({ this.setConfig({
isDrag: !store.state.dag.isDetails, isDrag: !store.state.dag.isDetails,
isAttachment: false, isAttachment: false,
isNewNodes: Permissions.getAuth() === false ? false : !store.state.dag.isDetails, isNewNodes: !store.state.dag.isDetails,//Permissions.getAuth() === false ? false : !store.state.dag.isDetails,
isDblclick: true, isDblclick: true,
isContextmenu: true, isContextmenu: true,
isClick: false isClick: false

2
escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

@ -62,7 +62,7 @@
</div> </div>
</template> </template>
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button> <x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
<x-button type="primary" shape="circle" @click="ok()" v-ps="['GENERAL_USER']" >{{$t('Add')}}</x-button> <x-button type="primary" shape="circle" @click="ok()">{{$t('Add')}}</x-button>
</div> </div>
</div> </div>
</div> </div>

4
escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue

@ -56,7 +56,6 @@
shape="circle" shape="circle"
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
v-ps="['GENERAL_USER']"
:title="$t('Edit')" :title="$t('Edit')"
icon="iconfont icon-bianjixiugai" icon="iconfont icon-bianjixiugai"
@click="_edit(item)"> @click="_edit(item)">
@ -77,8 +76,7 @@
size="xsmall" size="xsmall"
icon="iconfont icon-shanchu" icon="iconfont icon-shanchu"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

2
escheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue

@ -3,7 +3,7 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('Create Datasource')}}</x-button> <x-button type="ghost" size="small" @click="_create('')">{{$t('Create Datasource')}}</x-button>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>

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

@ -58,12 +58,12 @@
<span v-if="!item.scheduleReleaseState">-</span> <span v-if="!item.scheduleReleaseState">-</span>
</td> </td>
<td> <td>
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Edit')" @click="_edit(item)" :disabled="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-bianji"><!--{{$t('编辑')}}--></x-button> <x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Edit')" @click="_edit(item)" :disabled="item.releaseState === 'ONLINE'" icon="iconfont icon-bianji"><!--{{$t('编辑')}}--></x-button>
<x-button type="success" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Start')" @click="_start(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-qidong"><!--{{$t('启动')}}--></x-button> <x-button type="success" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Start')" @click="_start(item)" :disabled="item.releaseState !== 'ONLINE'" icon="iconfont icon-qidong"><!--{{$t('启动')}}--></x-button>
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Timing')" @click="_timing(item)" :disabled="item.releaseState !== 'ONLINE' || item.scheduleReleaseState !== null" v-ps="['GENERAL_USER']" icon="iconfont icon-timer"><!--{{$t('定时')}}--></x-button> <x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Timing')" @click="_timing(item)" :disabled="item.releaseState !== 'ONLINE' || item.scheduleReleaseState !== null" icon="iconfont icon-timer"><!--{{$t('定时')}}--></x-button>
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('online')" @click="_poponline(item)" v-if="item.releaseState === 'OFFLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu-copy"><!--{{$t('下线')}}--></x-button> <x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('online')" @click="_poponline(item)" v-if="item.releaseState === 'OFFLINE'" icon="iconfont icon-erji-xiaxianjilu-copy"><!--{{$t('下线')}}--></x-button>
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('offline')" @click="_downline(item)" v-if="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu"><!--{{$t('上线')}}--></x-button> <x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('offline')" @click="_downline(item)" v-if="item.releaseState === 'ONLINE'" icon="iconfont icon-erji-xiaxianjilu"><!--{{$t('上线')}}--></x-button>
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Cron Manage')" @click="_timingManage(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-paibanguanli"><!--{{$t('定时管理')}}--></x-button> <x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Cron Manage')" @click="_timingManage(item)" :disabled="item.releaseState !== 'ONLINE'" icon="iconfont icon-paibanguanli"><!--{{$t('定时管理')}}--></x-button>
<x-poptip <x-poptip
:ref="'poptip-delete-' + $index" :ref="'poptip-delete-' + $index"
placement="bottom-end" placement="bottom-end"
@ -81,8 +81,7 @@
size="xsmall" size="xsmall"
:disabled="item.releaseState === 'ONLINE'" :disabled="item.releaseState === 'ONLINE'"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

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

@ -137,7 +137,7 @@
</template> </template>
<div class="submit"> <div class="submit">
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button> <x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Start')}} </x-button> <x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('Start')}} </x-button>
</div> </div>
</div> </div>
</template> </template>

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

@ -3,7 +3,7 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <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> <x-button type="ghost" size="small" @click="() => this.$router.push({name: 'definition-create'})">{{$t('Create process')}}</x-button>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>

8
escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -73,7 +73,6 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Edit')" :title="$t('Edit')"
@click="_reEdit(item)" @click="_reEdit(item)"
v-ps="['GENERAL_USER']"
icon="iconfont icon-bianjixiugai" icon="iconfont icon-bianjixiugai"
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button> :disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button>
<x-button type="info" <x-button type="info"
@ -82,7 +81,6 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Rerun')" :title="$t('Rerun')"
@click="_reRun(item,$index)" @click="_reRun(item,$index)"
v-ps="['GENERAL_USER']"
icon="iconfont icon-shuaxin" icon="iconfont icon-shuaxin"
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button> :disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button>
<x-button type="success" <x-button type="success"
@ -91,7 +89,6 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Recovery Failed')" :title="$t('Recovery Failed')"
@click="_restore(item,$index)" @click="_restore(item,$index)"
v-ps="['GENERAL_USER']"
icon="iconfont icon-cuowuguanbishibai" icon="iconfont icon-cuowuguanbishibai"
:disabled="item.state !== 'FAILURE'"></x-button> :disabled="item.state !== 'FAILURE'"></x-button>
<x-button type="error" <x-button type="error"
@ -100,7 +97,6 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Stop')" :title="$t('Stop')"
@click="_stop(item)" @click="_stop(item)"
v-ps="['GENERAL_USER']"
icon="iconfont icon-zanting1" icon="iconfont icon-zanting1"
:disabled="item.state !== 'RUNNING_EXEUTION'"></x-button> :disabled="item.state !== 'RUNNING_EXEUTION'"></x-button>
<x-button type="warning" <x-button type="warning"
@ -109,7 +105,6 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')" :title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')"
@click="_suspend(item,$index)" @click="_suspend(item,$index)"
v-ps="['GENERAL_USER']"
:icon="item.state === 'PAUSE' ? 'iconfont icon-ai06' : 'iconfont icon-zanting'" :icon="item.state === 'PAUSE' ? 'iconfont icon-ai06' : 'iconfont icon-zanting'"
:disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"></x-button> :disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"></x-button>
<x-poptip <x-poptip
@ -128,8 +123,7 @@
shape="circle" shape="circle"
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

6
escheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue

@ -63,8 +63,7 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Edit')" :title="$t('Edit')"
@click="_edit(item)" @click="_edit(item)"
icon="iconfont icon-bianjixiugai" icon="iconfont icon-bianjixiugai">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-poptip <x-poptip
:ref="'poptip-' + $index" :ref="'poptip-' + $index"
@ -82,8 +81,7 @@
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')"
icon="iconfont icon-shanchu" icon="iconfont icon-shanchu">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

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

@ -3,7 +3,7 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('Create Project')}}</x-button> <x-button type="ghost" size="small" @click="_create('')">{{$t('Create Project')}}</x-button>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>

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

@ -49,7 +49,7 @@
<template slot="name">&nbsp;</template> <template slot="name">&nbsp;</template>
<template slot="content"> <template slot="content">
<div class="submit"> <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="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('Create')}} </x-button>
<x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('Cancel')}} </x-button> <x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('Cancel')}} </x-button>
</div> </div>
</template> </template>

12
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue

@ -51,8 +51,7 @@
:title="$t('Edit')" :title="$t('Edit')"
:disabled="_rtDisb(item)" :disabled="_rtDisb(item)"
@click="_edit(item,$index)" @click="_edit(item,$index)"
icon="iconfont icon-bianjixiugai" icon="iconfont icon-bianjixiugai">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-button <x-button
type="info" type="info"
@ -61,8 +60,7 @@
icon="iconfont icon-wendangxiugai" icon="iconfont icon-wendangxiugai"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Rename')" :title="$t('Rename')"
@click="_rename(item,$index)" @click="_rename(item,$index)">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-button <x-button
@ -72,8 +70,7 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Download')" :title="$t('Download')"
@click="_downloadFile(item)" @click="_downloadFile(item)"
icon="iconfont icon-download" icon="iconfont icon-download">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-poptip <x-poptip
@ -92,8 +89,7 @@
shape="circle" shape="circle"
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

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

@ -4,8 +4,8 @@
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<x-button-group size="small" > <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="() => $router.push({name: 'resource-file-create'})">{{$t('Create File')}}</x-button>
<x-button type="ghost" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload Files')}}</x-button> <x-button type="ghost" @click="_uploading">{{$t('Upload Files')}}</x-button>
</x-button-group> </x-button-group>
</template> </template>
</m-conditions> </m-conditions>

8
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/list.vue

@ -1,4 +1,4 @@
<template> v-ps<template>
<div class="list-model"> <div class="list-model">
<div class="table-box"> <div class="table-box">
<table class="fixed"> <table class="fixed">
@ -70,8 +70,7 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Edit')" :title="$t('Edit')"
@click="_edit(item)" @click="_edit(item)"
icon="iconfont icon-bianjixiugai" icon="iconfont icon-bianjixiugai">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-poptip <x-poptip
:ref="'poptip-' + $index" :ref="'poptip-' + $index"
@ -89,8 +88,7 @@
size="xsmall" size="xsmall"
icon="iconfont icon-shanchu" icon="iconfont icon-shanchu"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

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

@ -3,7 +3,7 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<x-button type="ghost" @click="_create" v-ps="['GENERAL_USER']" size="small" >{{$t('Create UDF Function')}}</x-button> <x-button type="ghost" @click="_create" size="small" >{{$t('Create UDF Function')}}</x-button>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>

9
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue

@ -58,8 +58,7 @@
icon="iconfont icon-wendangxiugai" icon="iconfont icon-wendangxiugai"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Rename')" :title="$t('Rename')"
@click="_rename(item,$index)" @click="_rename(item,$index)">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-button <x-button
type="info" type="info"
@ -68,8 +67,7 @@
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('Download')" :title="$t('Download')"
icon="iconfont icon-download" icon="iconfont icon-download"
@click="_downloadFile(item)" @click="_downloadFile(item)">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
<x-poptip <x-poptip
:ref="'poptip-' + $index" :ref="'poptip-' + $index"
@ -87,8 +85,7 @@
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')"
icon="iconfont icon-shanchu" icon="iconfont icon-shanchu">
v-ps="['GENERAL_USER']">
</x-button> </x-button>
</template> </template>
</x-poptip> </x-poptip>

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

@ -3,7 +3,7 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<x-button type="ghost" size="small" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload UDF Resources')}}</x-button> <x-button type="ghost" size="small" @click="_uploading">{{$t('Upload UDF Resources')}}</x-button>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>

9
escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue

@ -98,7 +98,9 @@
userName: '', userName: '',
userPassword: '', userPassword: '',
tenantId: {}, tenantId: {},
queueName: {}, queueName: {
id:''
},
email: '', email: '',
phone: '', phone: '',
tenantList: [], tenantList: [],
@ -197,6 +199,7 @@
}, },
_submit () { _submit () {
this.$refs['popup'].spinnerLoading = true this.$refs['popup'].spinnerLoading = true
console.log(this.tenantId.id)
let param = { let param = {
userName: this.userName, userName: this.userName,
userPassword: this.userPassword, userPassword: this.userPassword,
@ -205,9 +208,11 @@
queue: this.queueName.code, queue: this.queueName.code,
phone: this.phone phone: this.phone
} }
if (this.item) { if (this.item) {
param.id = this.item.id param.id = this.item.id
} }
this.store.dispatch(`security/${this.item ? 'updateUser' : 'createUser'}`, param).then(res => { this.store.dispatch(`security/${this.item ? 'updateUser' : 'createUser'}`, param).then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs['popup'].spinnerLoading = false
@ -232,7 +237,7 @@
this.phone = this.item.phone this.phone = this.item.phone
this.tenantId = _.find(this.tenantList, ['id', this.item.tenantId]) this.tenantId = _.find(this.tenantList, ['id', this.item.tenantId])
this.$nextTick(() => { this.$nextTick(() => {
this.queueName = _.find(this.queueList, ['code', this.item.queue]) this.queueName = _.find(this.queueList, ['code', this.item.queue])||{id:''}
}) })
} }
}) })

10
escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue

@ -9,6 +9,9 @@
<th> <th>
<span>{{$t('User Name')}}</span> <span>{{$t('User Name')}}</span>
</th> </th>
<th>
<span>用户类型</span>
</th>
<th> <th>
<span>{{$t('Tenant')}}</span> <span>{{$t('Tenant')}}</span>
</th> </th>
@ -21,6 +24,7 @@
<th> <th>
<span>{{$t('Phone')}}</span> <span>{{$t('Phone')}}</span>
</th> </th>
<th> <th>
<span>{{$t('Create Time')}}</span> <span>{{$t('Create Time')}}</span>
</th> </th>
@ -40,6 +44,9 @@
<a href="javascript:" class="links">{{item.userName || '-'}}</a> <a href="javascript:" class="links">{{item.userName || '-'}}</a>
</span> </span>
</td> </td>
<td>
<span>{{item.userType === 'GENERAL_USER' ? `${$t('Ordinary users')}` : `${$t('Administrator')}`}}</span>
</td>
<td><span>{{item.tenantName || '-'}}</span></td> <td><span>{{item.tenantName || '-'}}</span></td>
<td><span>{{item.queue || '-'}}</span></td> <td><span>{{item.queue || '-'}}</span></td>
<td> <td>
@ -62,7 +69,7 @@
<a href="javascript:" @click="_authUdfFunc(item,$index)">{{$t('UDF Function')}}</a> <a href="javascript:" @click="_authUdfFunc(item,$index)">{{$t('UDF Function')}}</a>
</div> </div>
<template slot="reference"> <template slot="reference">
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Authorize')" icon="iconfont icon-yonghu1"></x-button> <x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Authorize')" icon="iconfont icon-yonghu1" :disabled="item.userType === 'ADMIN_USER'"></x-button>
</template> </template>
</x-poptip> </x-poptip>
@ -84,6 +91,7 @@
size="xsmall" size="xsmall"
data-toggle="tooltip" data-toggle="tooltip"
:title="$t('delete')" :title="$t('delete')"
:disabled="item.userType === 'ADMIN_USER'"
icon="iconfont icon-shanchu"> icon="iconfont icon-shanchu">
</x-button> </x-button>
</template> </template>

4
escheduler-ui/src/js/module/mixin/disabledState.js

@ -28,11 +28,11 @@ export default {
} }
}, },
created () { created () {
this.isDetails = Permissions.getAuth() ? this.store.state.dag.isDetails : true this.isDetails =this.store.state.dag.isDetails// Permissions.getAuth() ? this.store.state.dag.isDetails : true
}, },
computed: { computed: {
_isDetails () { _isDetails () {
return this.isDetails ? 'icon-disabled' : '' return ''// this.isDetails ? 'icon-disabled' : ''
} }
} }
} }

Loading…
Cancel
Save