mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 20:58:11 +08:00
Plug-in front-end function
This commit is contained in:
parent
5f6b3ea332
commit
e94e323b08
@ -479,6 +479,7 @@ The text of each license is also included at licenses/ui-licenses/LICENSE-[proje
|
|||||||
========================================
|
========================================
|
||||||
MIT licenses
|
MIT licenses
|
||||||
========================================
|
========================================
|
||||||
|
@form-create/element-ui 1.0.18: https://github.com/xaboy/form-create MIT
|
||||||
axios 0.16.2: https://github.com/axios/axios MIT
|
axios 0.16.2: https://github.com/axios/axios MIT
|
||||||
bootstrap 3.3.7: https://github.com/twbs/bootstrap MIT
|
bootstrap 3.3.7: https://github.com/twbs/bootstrap MIT
|
||||||
canvg 1.5.1: https://github.com/canvg/canvg MIT
|
canvg 1.5.1: https://github.com/canvg/canvg MIT
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2018 xaboy
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
@ -13,6 +13,7 @@
|
|||||||
"build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js"
|
"build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@form-create/element-ui": "^1.0.18",
|
||||||
"@riophae/vue-treeselect": "^0.4.0",
|
"@riophae/vue-treeselect": "^0.4.0",
|
||||||
"axios": "^0.16.2",
|
"axios": "^0.16.2",
|
||||||
"bootstrap": "3.3.7",
|
"bootstrap": "3.3.7",
|
||||||
|
@ -38,6 +38,7 @@ import 'bootstrap/dist/css/bootstrap.min.css'
|
|||||||
import 'bootstrap/dist/js/bootstrap.min.js'
|
import 'bootstrap/dist/js/bootstrap.min.js'
|
||||||
import 'canvg/dist/browser/canvg.min.js'
|
import 'canvg/dist/browser/canvg.min.js'
|
||||||
import 'remixicon/fonts/remixicon.css'
|
import 'remixicon/fonts/remixicon.css'
|
||||||
|
import formCreate from '@form-create/element-ui'
|
||||||
|
|
||||||
// Component internationalization
|
// Component internationalization
|
||||||
const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: locale } : {}
|
const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: locale } : {}
|
||||||
@ -45,8 +46,7 @@ const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: locale } : {}
|
|||||||
i18n.globalScope.LOCALE === 'en_US' ? Vue.use(ElementUI, { locale }) : Vue.use(ElementUI)
|
i18n.globalScope.LOCALE === 'en_US' ? Vue.use(ElementUI, { locale }) : Vue.use(ElementUI)
|
||||||
|
|
||||||
// Vue.use(ans)
|
// Vue.use(ans)
|
||||||
Vue.use(useOpt)
|
Vue.use(useOpt, formCreate)
|
||||||
|
|
||||||
sync(store, router)
|
sync(store, router)
|
||||||
|
|
||||||
Vue.config.devtools = true
|
Vue.config.devtools = true
|
||||||
|
@ -55,18 +55,6 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</m-list-box>
|
</m-list-box>
|
||||||
<m-list-box>
|
|
||||||
<div slot="text"><strong class='requiredIcon'>*</strong>{{$t('Recipient')}}</div>
|
|
||||||
<div slot="content">
|
|
||||||
<m-email ref="refEmail" v-model="receivers" :disabled="isDetails" :repeat-data="receiversCc"></m-email>
|
|
||||||
</div>
|
|
||||||
</m-list-box>
|
|
||||||
<m-list-box>
|
|
||||||
<div slot="text">{{$t('Cc')}}</div>
|
|
||||||
<div slot="content">
|
|
||||||
<m-email ref="refCc" v-model="receiversCc" :disabled="isDetails" :repeat-data="receivers"></m-email>
|
|
||||||
</div>
|
|
||||||
</m-list-box>
|
|
||||||
</template>
|
</template>
|
||||||
<m-list-box v-show="type === 'HIVE'">
|
<m-list-box v-show="type === 'HIVE'">
|
||||||
<div slot="text">{{$t('SQL Parameter')}}</div>
|
<div slot="text">{{$t('SQL Parameter')}}</div>
|
||||||
@ -155,7 +143,6 @@
|
|||||||
import mLocalParams from './_source/localParams'
|
import mLocalParams from './_source/localParams'
|
||||||
import mStatementList from './_source/statementList'
|
import mStatementList from './_source/statementList'
|
||||||
import disabledState from '@/module/mixin/disabledState'
|
import disabledState from '@/module/mixin/disabledState'
|
||||||
import mEmail from '@/conf/home/pages/projects/pages/definition/pages/list/_source/email'
|
|
||||||
import codemirror from '@/conf/home/pages/resource/pages/file/pages/_source/codemirror'
|
import codemirror from '@/conf/home/pages/resource/pages/file/pages/_source/codemirror'
|
||||||
|
|
||||||
let editor
|
let editor
|
||||||
@ -188,10 +175,6 @@
|
|||||||
preStatements: [],
|
preStatements: [],
|
||||||
// Post statements
|
// Post statements
|
||||||
postStatements: [],
|
postStatements: [],
|
||||||
// recipients
|
|
||||||
receivers: [],
|
|
||||||
// copy to
|
|
||||||
receiversCc: [],
|
|
||||||
item: '',
|
item: '',
|
||||||
scriptBoxDialog: false
|
scriptBoxDialog: false
|
||||||
}
|
}
|
||||||
@ -274,14 +257,6 @@
|
|||||||
this.$message.warning(`${i18n.$t('Recipient required')}`)
|
this.$message.warning(`${i18n.$t('Recipient required')}`)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// receivers Subcomponent verification
|
|
||||||
if (this.sqlType === 0 && !this.$refs.refEmail._manualEmail()) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
// receiversCc Subcomponent verification
|
|
||||||
if (this.sqlType === 0 && !this.$refs.refCc._manualEmail()) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
// udfs Subcomponent verification Verification only if the data type is HIVE
|
// udfs Subcomponent verification Verification only if the data type is HIVE
|
||||||
if (this.type === 'HIVE') {
|
if (this.type === 'HIVE') {
|
||||||
if (!this.$refs.refUdfs._verifUdfs()) {
|
if (!this.$refs.refUdfs._verifUdfs()) {
|
||||||
@ -312,8 +287,6 @@
|
|||||||
udfs: this.udfs,
|
udfs: this.udfs,
|
||||||
sqlType: this.sqlType,
|
sqlType: this.sqlType,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
receivers: this.receivers.join(','),
|
|
||||||
receiversCc: this.receiversCc.join(','),
|
|
||||||
showType: (() => {
|
showType: (() => {
|
||||||
/**
|
/**
|
||||||
* Special processing return order TABLE,ATTACHMENT
|
* Special processing return order TABLE,ATTACHMENT
|
||||||
@ -366,19 +339,6 @@
|
|||||||
|
|
||||||
return editor
|
return editor
|
||||||
},
|
},
|
||||||
_getReceiver () {
|
|
||||||
let param = {}
|
|
||||||
let current = this.router.history.current
|
|
||||||
if (current.name === 'projects-definition-details') {
|
|
||||||
param.processDefinitionId = current.params.id
|
|
||||||
} else {
|
|
||||||
param.processInstanceId = current.params.id
|
|
||||||
}
|
|
||||||
this.store.dispatch('dag/getReceiver', param).then(res => {
|
|
||||||
this.receivers = res.receivers && res.receivers.split(',') || []
|
|
||||||
this.receiversCc = res.receiversCc && res.receiversCc.split(',') || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
_cacheParams () {
|
_cacheParams () {
|
||||||
this.$emit('on-cache-params', {
|
this.$emit('on-cache-params', {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
@ -387,8 +347,6 @@
|
|||||||
udfs: this.udfs,
|
udfs: this.udfs,
|
||||||
sqlType: this.sqlType,
|
sqlType: this.sqlType,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
receivers: this.receivers.join(','),
|
|
||||||
receiversCc: this.receiversCc.join(','),
|
|
||||||
showType: (() => {
|
showType: (() => {
|
||||||
let showType = this.showType
|
let showType = this.showType
|
||||||
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
|
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
|
||||||
@ -419,8 +377,6 @@
|
|||||||
}
|
}
|
||||||
if (val !== 0) {
|
if (val !== 0) {
|
||||||
this.title = ''
|
this.title = ''
|
||||||
this.receivers = []
|
|
||||||
this.receiversCc = []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Listening data source
|
// Listening data source
|
||||||
@ -455,13 +411,6 @@
|
|||||||
this.preStatements = o.params.preStatements || []
|
this.preStatements = o.params.preStatements || []
|
||||||
this.postStatements = o.params.postStatements || []
|
this.postStatements = o.params.postStatements || []
|
||||||
this.title = o.params.title || ''
|
this.title = o.params.title || ''
|
||||||
this.receivers = o.params.receivers && o.params.receivers.split(',') || []
|
|
||||||
this.receiversCc = o.params.receiversCc && o.params.receiversCc.split(',') || []
|
|
||||||
}
|
|
||||||
// read tasks from cache
|
|
||||||
if (!_.some(this.store.state.dag.cacheTasks, { id: this.createNodeId }) &&
|
|
||||||
this.router.history.current.name !== 'definition-create') {
|
|
||||||
this._getReceiver()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@ -487,8 +436,6 @@
|
|||||||
udfs: this.udfs,
|
udfs: this.udfs,
|
||||||
sqlType: this.sqlType,
|
sqlType: this.sqlType,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
receivers: this.receivers.join(','),
|
|
||||||
receiversCc: this.receiversCc.join(','),
|
|
||||||
showType: (() => {
|
showType: (() => {
|
||||||
let showType = this.showType
|
let showType = this.showType
|
||||||
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
|
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
|
||||||
@ -504,6 +451,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { mListBox, mDatasource, mLocalParams, mUdfs, mSqlType, mStatementList, mEmail, mScriptBox }
|
components: { mListBox, mDatasource, mLocalParams, mUdfs, mSqlType, mStatementList, mScriptBox }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1175,8 +1175,6 @@
|
|||||||
}
|
}
|
||||||
if (val !== 0) {
|
if (val !== 0) {
|
||||||
this.title = ''
|
this.title = ''
|
||||||
this.receivers = []
|
|
||||||
this.receiversCc = []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Listening data source
|
// Listening data source
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
<li><span class="tab">{{$t('Worker group')}}:</span><span class="content" v-if="workerGroupList.length">{{startupParam.workerGroup}}</span></li>
|
<li><span class="tab">{{$t('Worker group')}}:</span><span class="content" v-if="workerGroupList.length">{{startupParam.workerGroup}}</span></li>
|
||||||
<li><span class="tab">{{$t('Notification strategy')}}:</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li>
|
<li><span class="tab">{{$t('Notification strategy')}}:</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li>
|
||||||
<li><span class="tab">{{$t('Notification group')}}:</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li>
|
<li><span class="tab">{{$t('Notification group')}}:</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li>
|
||||||
<li><span class="tab">{{$t('Recipient')}}:</span><span class="content">{{startupParam.receivers || '-'}}</span></li>
|
|
||||||
<li><span class="tab">{{$t('Cc')}}:</span><span class="content">{{startupParam.receiversCc || '-'}}</span></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -177,8 +177,6 @@
|
|||||||
timingDialog: false,
|
timingDialog: false,
|
||||||
timingData: {
|
timingData: {
|
||||||
item: {},
|
item: {},
|
||||||
receiversD: [],
|
|
||||||
receiversCcD: [],
|
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
relatedItemsDialog: false,
|
relatedItemsDialog: false,
|
||||||
@ -191,7 +189,7 @@
|
|||||||
pageSize: Number
|
pageSize: Number
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('dag', ['editProcessState', 'getStartCheck', 'getReceiver', 'deleteDefinition', 'batchDeleteDefinition', 'exportDefinition', 'getProcessDefinitionVersionsPage', 'copyProcess', 'switchProcessDefinitionVersion', 'deleteProcessDefinitionVersion', 'moveProcess']),
|
...mapActions('dag', ['editProcessState', 'getStartCheck', 'deleteDefinition', 'batchDeleteDefinition', 'exportDefinition', 'getProcessDefinitionVersionsPage', 'copyProcess', 'switchProcessDefinitionVersion', 'deleteProcessDefinitionVersion', 'moveProcess']),
|
||||||
...mapActions('security', ['getWorkerGroupsAll']),
|
...mapActions('security', ['getWorkerGroupsAll']),
|
||||||
|
|
||||||
selectable (row, index) {
|
selectable (row, index) {
|
||||||
@ -226,30 +224,13 @@
|
|||||||
closeStart () {
|
closeStart () {
|
||||||
this.startDialog = false
|
this.startDialog = false
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get emial
|
|
||||||
*/
|
|
||||||
_getReceiver (id) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this.getReceiver({ processDefinitionId: id }).then(res => {
|
|
||||||
resolve({
|
|
||||||
receivers: res.receivers && res.receivers.split(',') || [],
|
|
||||||
receiversCc: res.receiversCc && res.receiversCc.split(',') || []
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* timing
|
* timing
|
||||||
*/
|
*/
|
||||||
_timing (item) {
|
_timing (item) {
|
||||||
this._getReceiver(item.id).then(res => {
|
this.timingData.item = item
|
||||||
this.timingData.item = item
|
this.timingData.type = 'timing'
|
||||||
this.timingData.receiversD = res.receivers
|
this.timingDialog = true
|
||||||
this.timingData.receiversCcD = res.receiversCc
|
|
||||||
this.timingData.type = 'timing'
|
|
||||||
this.timingDialog = true
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onUpdateTiming () {
|
onUpdateTiming () {
|
||||||
this._onUpdate()
|
this._onUpdate()
|
||||||
|
@ -99,22 +99,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix list">
|
|
||||||
<div class="text">
|
|
||||||
{{$t('Recipient')}}
|
|
||||||
</div>
|
|
||||||
<div class="cont" style="width: 688px;">
|
|
||||||
<m-email v-model="receivers" :repeat-data="receiversCc"></m-email>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix list">
|
|
||||||
<div class="text">
|
|
||||||
{{$t('Cc')}}
|
|
||||||
</div>
|
|
||||||
<div class="cont" style="width: 688px;">
|
|
||||||
<m-email v-model="receiversCc" :repeat-data="receivers"></m-email>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix list">
|
<div class="clearfix list">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
{{$t('Complement Data')}}
|
{{$t('Complement Data')}}
|
||||||
@ -164,7 +148,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import mEmail from './email.vue'
|
|
||||||
import store from '@/conf/home/store'
|
import store from '@/conf/home/store'
|
||||||
import { warningTypeList } from './util'
|
import { warningTypeList } from './util'
|
||||||
import mPriority from '@/module/components/priority/priority'
|
import mPriority from '@/module/components/priority/priority'
|
||||||
@ -186,8 +169,6 @@
|
|||||||
spinnerLoading: false,
|
spinnerLoading: false,
|
||||||
execType: false,
|
execType: false,
|
||||||
taskDependType: 'TASK_POST',
|
taskDependType: 'TASK_POST',
|
||||||
receivers: [],
|
|
||||||
receiversCc: [],
|
|
||||||
runMode: 'RUN_MODE_SERIAL',
|
runMode: 'RUN_MODE_SERIAL',
|
||||||
processInstancePriority: 'MEDIUM',
|
processInstancePriority: 'MEDIUM',
|
||||||
workerGroup: 'default'
|
workerGroup: 'default'
|
||||||
@ -219,8 +200,6 @@
|
|||||||
taskDependType: this.taskDependType,
|
taskDependType: this.taskDependType,
|
||||||
runMode: this.runMode,
|
runMode: this.runMode,
|
||||||
processInstancePriority: this.processInstancePriority,
|
processInstancePriority: this.processInstancePriority,
|
||||||
receivers: this.receivers.join(',') || '',
|
|
||||||
receiversCc: this.receiversCc.join(',') || '',
|
|
||||||
workerGroup: this.workerGroup
|
workerGroup: this.workerGroup
|
||||||
}
|
}
|
||||||
// Executed from the specified node
|
// Executed from the specified node
|
||||||
@ -247,12 +226,6 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
_getReceiver () {
|
|
||||||
this.store.dispatch('dag/getReceiver', { processDefinitionId: this.startData.id }).then(res => {
|
|
||||||
this.receivers = res.receivers && res.receivers.split(',') || []
|
|
||||||
this.receiversCc = res.receiversCc && res.receiversCc.split(',') || []
|
|
||||||
})
|
|
||||||
},
|
|
||||||
ok () {
|
ok () {
|
||||||
this._start()
|
this._start()
|
||||||
},
|
},
|
||||||
@ -268,8 +241,6 @@
|
|||||||
created () {
|
created () {
|
||||||
this.warningType = this.warningTypeList[0].id
|
this.warningType = this.warningTypeList[0].id
|
||||||
this.workflowName = this.startData.name
|
this.workflowName = this.startData.name
|
||||||
|
|
||||||
this._getReceiver()
|
|
||||||
let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || []
|
let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || []
|
||||||
if (stateWorkerGroupsList.length) {
|
if (stateWorkerGroupsList.length) {
|
||||||
this.workerGroup = stateWorkerGroupsList[0].id
|
this.workerGroup = stateWorkerGroupsList[0].id
|
||||||
@ -292,7 +263,7 @@
|
|||||||
this.workflowName = this.startData.name
|
this.workflowName = this.startData.name
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
components: { mEmail, mPriority, mWorkerGroups }
|
components: { mPriority, mWorkerGroups }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -136,22 +136,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix list">
|
|
||||||
<div class="text">
|
|
||||||
{{$t('Recipient')}}
|
|
||||||
</div>
|
|
||||||
<div class="cont" style="width: 680px;">
|
|
||||||
<m-email v-model="receivers" :repeat-data="receiversCc"></m-email>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix list">
|
|
||||||
<div class="text">
|
|
||||||
{{$t('Cc')}}
|
|
||||||
</div>
|
|
||||||
<div class="cont" style="width: 680px;">
|
|
||||||
<m-email v-model="receiversCc" :repeat-data="receivers"></m-email>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="submit">
|
<div class="submit">
|
||||||
<el-button type="text" size="small" @click="close()"> {{$t('Cancel')}} </el-button>
|
<el-button type="text" size="small" @click="close()"> {{$t('Cancel')}} </el-button>
|
||||||
<el-button type="primary" size="small" round :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : (timingData.item.crontab ? $t('Edit') : $t('Create'))}} </el-button>
|
<el-button type="primary" size="small" round :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : (timingData.item.crontab ? $t('Edit') : $t('Create'))}} </el-button>
|
||||||
@ -159,9 +143,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
|
||||||
import i18n from '@/module/i18n'
|
import i18n from '@/module/i18n'
|
||||||
import mEmail from './email.vue'
|
|
||||||
import store from '@/conf/home/store'
|
import store from '@/conf/home/store'
|
||||||
import { warningTypeList } from './util'
|
import { warningTypeList } from './util'
|
||||||
import { vCrontab } from '@/module/components/crontab/index'
|
import { vCrontab } from '@/module/components/crontab/index'
|
||||||
@ -184,8 +166,6 @@
|
|||||||
scheduleTime: '',
|
scheduleTime: '',
|
||||||
crontab: '0 0 * * * ? *',
|
crontab: '0 0 * * * ? *',
|
||||||
cronPopover: false,
|
cronPopover: false,
|
||||||
receivers: [],
|
|
||||||
receiversCc: [],
|
|
||||||
i18n: i18n.globalScope.LOCALE,
|
i18n: i18n.globalScope.LOCALE,
|
||||||
processInstancePriority: 'MEDIUM',
|
processInstancePriority: 'MEDIUM',
|
||||||
workerGroup: '',
|
workerGroup: '',
|
||||||
@ -229,8 +209,6 @@
|
|||||||
warningType: this.warningType,
|
warningType: this.warningType,
|
||||||
processInstancePriority: this.processInstancePriority,
|
processInstancePriority: this.processInstancePriority,
|
||||||
warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
|
warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
|
||||||
receivers: this.receivers.join(',') || '',
|
|
||||||
receiversCc: this.receiversCc.join(',') || '',
|
|
||||||
workerGroup: this.workerGroup
|
workerGroup: this.workerGroup
|
||||||
}
|
}
|
||||||
let msg = ''
|
let msg = ''
|
||||||
@ -337,8 +315,6 @@
|
|||||||
this.crontab = '0 0 * * * ? *'
|
this.crontab = '0 0 * * * ? *'
|
||||||
this.scheduleTime = times
|
this.scheduleTime = times
|
||||||
}
|
}
|
||||||
this.receivers = _.cloneDeep(this.timingData.receiversD)
|
|
||||||
this.receiversCc = _.cloneDeep(this.timingData.receiversCcD)
|
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
let item = this.timingData.item
|
let item = this.timingData.item
|
||||||
@ -363,7 +339,7 @@
|
|||||||
}).catch(() => { this.warningGroupId = '' })
|
}).catch(() => { this.warningGroupId = '' })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: { vCrontab, mEmail, mPriority, mWorkerGroups }
|
components: { vCrontab, mPriority, mWorkerGroups }
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -124,16 +124,14 @@
|
|||||||
list: [],
|
list: [],
|
||||||
timingDialog: false,
|
timingDialog: false,
|
||||||
timingData: {
|
timingData: {
|
||||||
item: {},
|
item: {}
|
||||||
receiversD: [],
|
|
||||||
receiversCcD: []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver', 'deleteTiming']),
|
...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'deleteTiming']),
|
||||||
/**
|
/**
|
||||||
* delete
|
* delete
|
||||||
*/
|
*/
|
||||||
@ -228,29 +226,12 @@
|
|||||||
this.$message.error(e.msg || '')
|
this.$message.error(e.msg || '')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* get email
|
|
||||||
*/
|
|
||||||
_getReceiver (id) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this.getReceiver({ processDefinitionId: id }).then(res => {
|
|
||||||
resolve({
|
|
||||||
receivers: res.receivers && res.receivers.split(',') || [],
|
|
||||||
receiversCc: res.receiversCc && res.receiversCc.split(',') || []
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* timing
|
* timing
|
||||||
*/
|
*/
|
||||||
_editTiming (item) {
|
_editTiming (item) {
|
||||||
this._getReceiver(item.processDefinitionId).then(res => {
|
this.timingData.item = item
|
||||||
this.timingData.item = item
|
this.timingDialog = true
|
||||||
this.timingData.receiversD = res.receivers
|
|
||||||
this.timingData.receiversCcD = res.receiversCc
|
|
||||||
this.timingDialog = true
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onUpdateTiming () {
|
onUpdateTiming () {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('Operation')" width="130">
|
<el-table-column :label="$t('Operation')" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip :content="$t('Managing Users')" placement="top">
|
|
||||||
<el-button type="primary" size="mini" icon="el-icon-user" @click="_mangeUser(scope.row, scope.$index)" circle></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip :content="$t('Edit')" placement="top">
|
<el-tooltip :content="$t('Edit')" placement="top">
|
||||||
<span><el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="_edit(scope.row)" circle></el-button></span>
|
<span><el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="_edit(scope.row)" circle></el-button></span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -60,18 +57,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
|
||||||
:visible.sync="transferDialog"
|
|
||||||
width="auto">
|
|
||||||
<m-transfer :transferData="transferData" @onUpdate="onUpdate" @close="close"></m-transfer>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
|
||||||
import i18n from '@/module/i18n'
|
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
import mTransfer from '@/module/components/transfer/transfer'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'user-list',
|
name: 'user-list',
|
||||||
@ -79,14 +68,7 @@
|
|||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
transferDialog: false,
|
transferDialog: false,
|
||||||
item: {},
|
item: {}
|
||||||
transferData: {
|
|
||||||
sourceListPrs: [],
|
|
||||||
targetListPrs: [],
|
|
||||||
type: {
|
|
||||||
name: `${i18n.$t('Managing Users')}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -95,7 +77,7 @@
|
|||||||
pageSize: Number
|
pageSize: Number
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('security', ['deleteAlertgrou', 'getAuthList', 'grantAuthorization']),
|
...mapActions('security', ['deleteAlertgrou', 'grantAuthorization']),
|
||||||
_delete (item, i) {
|
_delete (item, i) {
|
||||||
this.deleteAlertgrou({
|
this.deleteAlertgrou({
|
||||||
id: item.id
|
id: item.id
|
||||||
@ -109,30 +91,6 @@
|
|||||||
_edit (item) {
|
_edit (item) {
|
||||||
this.$emit('on-edit', item)
|
this.$emit('on-edit', item)
|
||||||
},
|
},
|
||||||
_mangeUser (item, i) {
|
|
||||||
this.getAuthList({
|
|
||||||
id: item.id,
|
|
||||||
type: 'user',
|
|
||||||
category: 'users'
|
|
||||||
}).then(data => {
|
|
||||||
let sourceListPrs = _.map(data[0], v => {
|
|
||||||
return {
|
|
||||||
id: v.id,
|
|
||||||
name: v.userName
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let targetListPrs = _.map(data[1], v => {
|
|
||||||
return {
|
|
||||||
id: v.id,
|
|
||||||
name: v.userName
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.item = item
|
|
||||||
this.transferData.sourceListPrs = sourceListPrs
|
|
||||||
this.transferData.targetListPrs = targetListPrs
|
|
||||||
this.transferDialog = true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onUpdate (userIds) {
|
onUpdate (userIds) {
|
||||||
this._grantAuthorization('alert-group/grant-user', {
|
this._grantAuthorization('alert-group/grant-user', {
|
||||||
userIds: userIds,
|
userIds: userIds,
|
||||||
@ -168,6 +126,6 @@
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
},
|
},
|
||||||
components: { mTransfer }
|
components: {}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -806,18 +806,6 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* Get the mailbox list interface
|
|
||||||
*/
|
|
||||||
getReceiver ({ state }, payload) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
io.get(`projects/${state.projectName}/executors/get-receiver-cc`, payload, res => {
|
|
||||||
resolve(res.data)
|
|
||||||
}).catch(e => {
|
|
||||||
reject(e)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getTaskListDefIdAll ({ state }, payload) {
|
getTaskListDefIdAll ({ state }, payload) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => {
|
io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => {
|
||||||
|
Loading…
Reference in New Issue
Block a user