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.
*/
<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">
<div class="projects-create-model">
<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">
<el-input
type="input"
v-model="projectName"
maxlength="60"
size="small"
:placeholder="$t('Please enter name')">
v-model="projectName"
:placeholder="$t('Please enter name')"
maxlength="60"
size="small"
type="input">
</el-input>
</template>
</m-list-box-f>
<m-list-box-f>
<template slot="name">{{$t('Description')}}</template>
<template slot="name">{{ $t('Description') }}</template>
<template slot="content">
<el-input
type="textarea"
v-model="description"
size="small"
:placeholder="$t('Please enter description')">
v-model="description"
:placeholder="$t('Please enter description')"
size="small"
type="textarea">
</el-input>
</template>
</m-list-box-f>
@ -97,6 +98,9 @@
this.$refs.popup.spinnerLoading = false
})
},
_close () {
this.$emit('close')
},
_verification () {
if (!this.projectName) {
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">
<m-conditions @on-conditions="_onConditions">
<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
:visible.sync="createProjectDialog"
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>
</template>
</m-conditions>
</template>
<template slot="content">
<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">
<el-pagination
background
@ -104,6 +105,9 @@
this.createProjectDialog = false
this._debounceGET()
},
_close () {
this.createProjectDialog = false
},
_getList (flag) {
this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => {

Loading…
Cancel
Save