Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
wangjiahao 2021-06-18 11:10:23 +08:00
commit 8aaf2aa0b6
6 changed files with 45 additions and 9 deletions

View File

@ -39,6 +39,9 @@
<el-checkbox v-for="i in 7" :key="i" :label="i+''" @change="type = '4'" />
</el-checkbox-group>
</div>
<div>
<span style="font-size: 12px;">{{ $t('cron.week_tips') }}</span>
</div>
</div>
</template>

View File

@ -1099,6 +1099,7 @@ export default {
every_week: 'Every week',
week_start: 'From week',
week_end: 'to week',
every_year: 'Every year'
every_year: 'Every year',
week_tips: 'Tips1-7 mapping SUN-SAT'
}
}

View File

@ -1099,6 +1099,7 @@ export default {
every_week: '每周',
week_start: '從星期',
week_end: '至星期',
every_year: '每年'
every_year: '每年',
week_tips: '說明1-7 分別對應 周日-周六'
}
}

View File

@ -1100,6 +1100,7 @@ export default {
every_week: '每周',
week_start: '从星期',
week_end: '至星期',
every_year: '每年'
every_year: '每年',
week_tips: '说明1-7 分别对应 周日-周六'
}
}

View File

@ -547,7 +547,7 @@ export default {
this.taskForm.endTime = ''
this.taskForm.cron = ''
} else {
this.taskForm.cron = '0 0 * ? * * *'
this.taskForm.cron = '00 00 * ? * * *'
}
},
listTaskLog(loading = true) {

View File

@ -2,19 +2,31 @@
<el-col style="padding: 0 5px 0 5px;">
<el-col>
<el-row>
<span class="header-title">
{{ $t('commons.datasource') }}
<el-button style="float: right;padding-right: 7px;margin-top: -8px" icon="el-icon-plus" type="text" @click="addFolder" />
<span v-show="!showSearchInput" class="header-title">
<div class="de-input" style="margin-top: 7px !important;">
{{ $t('commons.datasource') }}
<el-button style="float: right;padding-right: 7px;margin-top: -8px" icon="el-icon-plus" type="text" @click="addFolder" />
<el-button style="float: right;padding-right: 15px;margin-top: -8px" icon="el-icon-search" type="text" @click="showSearchWidget" />
</div>
</span>
<span v-show="showSearchInput" class="header-title">
<div class="de-input" style="margin-top: 0px !important;margin-bottom: 12px !important">
<el-input v-model="key">
<el-button slot="append" icon="el-icon-close" @click="closeSearchWidget" />
</el-input>
</div>
</span>
</el-row>
<el-col class="custom-tree-container">
<div class="block">
<el-tree
ref="panel_list_tree"
ref="myDsTree"
:default-expanded-keys="expandedArray"
:data="tData"
node-key="id"
default-expand-all
:expand-on-click-node="true"
:filter-node-method="filterNode"
@node-click="nodeClick"
>
<span slot-scope="{ node, data }" class="custom-tree-node-list father">
@ -74,13 +86,31 @@ export default {
data() {
return {
expandedArray: [],
tData: []
tData: [],
showSearchInput: false,
key: ''
}
},
watch: {
key(val) {
this.$refs.myDsTree.filter(val)
}
},
mounted() {
this.queryTreeDatas()
},
methods: {
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
showSearchWidget() {
this.showSearchInput = true
},
closeSearchWidget() {
this.key = ''
this.showSearchInput = false
},
queryTreeDatas() {
listDatasource().then(res => {
this.tData = this.buildTree(res.data)