This commit is contained in:
bwcx_jzy 2024-01-12 09:55:50 +08:00
parent 6a793fa5fc
commit ab5302e953
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53
11 changed files with 42 additions and 11 deletions

View File

@ -81,7 +81,8 @@ public abstract class BaseDbService<T extends BaseDbModel> extends BaseDbCommonS
*/
private static final Order[] DEFAULT_ORDERS = new Order[]{
new Order("createTimeMillis", Direction.DESC),
new Order("modifyTimeMillis", Direction.DESC)
new Order("modifyTimeMillis", Direction.DESC),
new Order("id", Direction.DESC)
};
public BaseDbService() {

View File

@ -66,7 +66,8 @@ public abstract class BaseWorkspaceService<T extends BaseWorkspaceModel> extends
private static final Order[] SORT_DEFAULT_ORDERS = new Order[]{
new Order("sortValue", Direction.DESC),
new Order("createTimeMillis", Direction.DESC),
new Order("modifyTimeMillis", Direction.DESC)
new Order("modifyTimeMillis", Direction.DESC),
new Order("id", Direction.DESC)
};
public BaseWorkspaceService() {

View File

@ -225,6 +225,7 @@ const theme = [
{ name: '深色 dracula', theme: 'dracula' },
{ name: '浅色 eclipse', theme: 'eclipse' },
{ name: '深色2 blackboard', theme: 'blackboard' },
{ name: '浅色 idea', theme: 'idea' },
{ name: 'ayu-dark', theme: 'ayu-dark' },
{ name: 'ayu-mirage', theme: 'ayu-mirage' },
{ name: 'base16-dark', theme: 'base16-dark' },
@ -242,7 +243,7 @@ const theme = [
{ name: 'gruvbox-dark', theme: 'gruvbox-dark' },
{ name: 'hopscotch', theme: 'hopscotch' },
{ name: 'icecoder', theme: 'icecoder' },
{ name: 'idea', theme: 'idea' },
{ name: 'isotope', theme: 'isotope' },
{ name: 'juejin', theme: 'juejin' },
{ name: 'lesser-dark', theme: 'lesser-dark' },

View File

@ -1,7 +1,12 @@
<template>
<div>
<template v-if="inputData.indexOf(refTag) == -1 && type == 'password'">
<a-input-password :placeholder="placeholder" v-model:value="inputData" @change="inputChange">
<template v-if="inputData.indexOf(refTag) === -1 && type == 'password'">
<a-input-password
:placeholder="placeholder"
:disabled="!!selectData"
v-model:value="inputData"
@change="inputChange"
>
<template v-slot:addonBefore>
<a-tooltip>
<template #title>
@ -11,7 +16,7 @@
当前没有可以引用的环境变量
</ul>
</template>
<a-select placeholder="引用环境变量" style="width: 120px" @change="selectChange">
<a-select placeholder="引用环境变量" style="width: 120px" v-model:value="selectData" @change="selectChange">
<a-select-option value="">不引用环境变量</a-select-option>
<a-select-option v-for="item in envList" :key="item.id" :value="item.name"
>{{ item.name }}
@ -22,7 +27,7 @@
</a-input-password>
</template>
<template v-else>
<a-input :placeholder="placeholder" v-model:value="inputData" @change="inputChange">
<a-input :placeholder="placeholder" :disabled="!!selectData" v-model:value="inputData" @change="inputChange">
<template v-slot:addonBefore>
<a-tooltip>
<template #title>
@ -31,7 +36,7 @@
当前没有可以引用的环境变量
</ul>
</template>
<a-select placeholder="引用环境变量" style="width: 120px" @change="selectChange">
<a-select placeholder="引用环境变量" style="width: 120px" v-model:value="selectData" @change="selectChange">
<a-select-option value="">引用环境变量</a-select-option>
<a-select-option v-for="item in envList" :key="item.id" :value="item.name"
>{{ item.name }}
@ -50,7 +55,8 @@ export default {
data() {
return {
inputData: '',
refTag: '$ref.wEnv.'
refTag: '$ref.wEnv.',
selectData: null
}
},
props: {
@ -77,6 +83,11 @@ export default {
handler(v) {
this.inputData = v
if (v.indexOf(this.refTag) == -1) {
this.selectData = null
} else {
// this.selectData = v.replace(this.refTag)
}
},
immediate: true
@ -84,6 +95,7 @@ export default {
},
methods: {
selectChange(v) {
this.selectData = v
const newV = v ? this.refTag + v : ''
this.$emit('change', newV)
},

View File

@ -100,6 +100,7 @@ export default {
methods: {
selectChange(v) {
this.$emit('update:value', v)
this.$emit('change', v)
},
addInput(v) {
if (!v) {
@ -113,11 +114,12 @@ export default {
this.selected = v
//
this.selectChange(v)
this.$emit('addOption', this.optionList)
},
refreshSelect() {
this.$emit('onRefreshSelect')
}
},
emits: ['update:value', 'onRefreshSelect']
emits: ['update:value', 'onRefreshSelect', 'change', 'addOption']
}
</script>

View File

@ -1327,6 +1327,7 @@ export default {
}
:deep(.ant-statistic div) {
display: inline-block;
font-weight: normal;
}
:deep(.ant-statistic-content-value, .ant-statistic-content) {
font-size: 16px;

View File

@ -975,6 +975,7 @@ export default {
<style scoped>
:deep(.ant-statistic div) {
display: inline-block;
font-weight: normal;
}
:deep(.ant-statistic-content-value, .ant-statistic-content) {
font-size: 16px;

View File

@ -1186,6 +1186,7 @@ export default {
<style scoped>
.header-statistic :deep(.ant-statistic div) {
display: inline-block;
font-weight: normal;
}
.header-statistic :deep(.ant-statistic-content-value, .ant-statistic-content) {
font-size: 16px;

View File

@ -8,7 +8,11 @@
banner
/>
<a-form-item class="node-content-config">
<code-editor v-model:content="temp.content" :options="{ mode: 'yaml', tabSize: 2 }"></code-editor>
<code-editor
v-model:content="temp.content"
:options="{ mode: 'yaml', tabSize: 2 }"
:showTool="true"
></code-editor>
</a-form-item>
<a-form-item :wrapper-col="{ span: 14, offset: 2 }">
<a-button type="primary" class="btn" :disabled="submitAble" @click="onSubmit(false)">保存</a-button>

View File

@ -624,6 +624,12 @@ export default {
customRender: ({ text }) => parseTime(text),
width: '170px'
},
{
title: '排序值',
dataIndex: 'sortValue',
sorter: true,
width: '80px'
},
{
title: '操作',
dataIndex: 'operation',

View File

@ -19,6 +19,7 @@
v-model:content="temp.content"
fileSuffix="conf.yml"
:options="{ mode: 'yaml', tabSize: 2 }"
:showTool="true"
></code-editor>
</a-form-item>
<a-form-item :wrapper-col="{ span: 14, offset: 2 }">