break60 4 years ago
parent
commit
02857c59e6
  1. 28
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue
  2. 10
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue

28
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue

@ -15,29 +15,30 @@
* limitations under the License. * limitations under the License.
*/ */
<template> <template>
<m-popup ref="popup" :ok-text="item ? $t('Edit') : $t('Submit')" :nameText="item ? $t('Edit') : $t('Create Project')" @ok="_ok"> <m-popup ref="popup" :nameText="item ? $t('Edit') : $t('Create Project')" :ok-text="item ? $t('Edit') : $t('Submit')"
@close="_close" @ok="_ok">
<template slot="content"> <template slot="content">
<div class="projects-create-model"> <div class="projects-create-model">
<m-list-box-f> <m-list-box-f>
<template slot="name"><strong>*</strong>{{$t('Project Name')}}</template> <template slot="name"><strong>*</strong>{{ $t('Project Name') }}</template>
<template slot="content"> <template slot="content">
<el-input <el-input
type="input" v-model="projectName"
v-model="projectName" :placeholder="$t('Please enter name')"
maxlength="60" maxlength="60"
size="small" size="small"
:placeholder="$t('Please enter name')"> type="input">
</el-input> </el-input>
</template> </template>
</m-list-box-f> </m-list-box-f>
<m-list-box-f> <m-list-box-f>
<template slot="name">{{$t('Description')}}</template> <template slot="name">{{ $t('Description') }}</template>
<template slot="content"> <template slot="content">
<el-input <el-input
type="textarea" v-model="description"
v-model="description" :placeholder="$t('Please enter description')"
size="small" size="small"
:placeholder="$t('Please enter description')"> type="textarea">
</el-input> </el-input>
</template> </template>
</m-list-box-f> </m-list-box-f>
@ -97,6 +98,9 @@
this.$refs.popup.spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
}, },
_close () {
this.$emit('close')
},
_verification () { _verification () {
if (!this.projectName) { if (!this.projectName) {
this.$message.warning(`${i18n.$t('Please enter name')}`) this.$message.warning(`${i18n.$t('Please enter name')}`)

10
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue

@ -19,18 +19,19 @@
<template slot="conditions"> <template slot="conditions">
<m-conditions @on-conditions="_onConditions"> <m-conditions @on-conditions="_onConditions">
<template slot="button-group"> <template slot="button-group">
<el-button size="mini" @click="_create('')">{{$t('Create Project')}}</el-button> <el-button size="mini" @click="_create('')">{{ $t('Create Project') }}</el-button>
<el-dialog <el-dialog
:visible.sync="createProjectDialog" :visible.sync="createProjectDialog"
width="40%"> width="40%">
<m-create-project :item="item" @_onUpdate="_onUpdate"></m-create-project> <m-create-project :item="item" @_onUpdate="_onUpdate" @close="_close"></m-create-project>
</el-dialog> </el-dialog>
</template> </template>
</m-conditions> </m-conditions>
</template> </template>
<template slot="content"> <template slot="content">
<template v-if="projectsList.length || total>0"> <template v-if="projectsList.length || total>0">
<m-list :projects-list="projectsList" @on-update="_onUpdate" :page-no="searchParams.pageNo" :page-size="searchParams.pageSize"></m-list> <m-list :projects-list="projectsList" @on-update="_onUpdate" :page-no="searchParams.pageNo"
:page-size="searchParams.pageSize"></m-list>
<div class="page-box"> <div class="page-box">
<el-pagination <el-pagination
background background
@ -104,6 +105,9 @@
this.createProjectDialog = false this.createProjectDialog = false
this._debounceGET() this._debounceGET()
}, },
_close () {
this.createProjectDialog = false
},
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => { this.getProjectsList(this.searchParams).then(res => {

Loading…
Cancel
Save