refactor: 重构并添加版权信息

- 在多个 Java 文件中添加了版权信息的代码块
- 更新了部分文件中的导入路径
- 重命名了一些工具类,如 FileUtil 改为 CsFileUtil
- 完善流水线机制,新增重启流水线、停止流水线功能
This commit is contained in:
2025-07-28 20:18:19 +08:00
parent 4673ca356c
commit cbb5223c0e
179 changed files with 2752 additions and 751 deletions
@@ -0,0 +1,75 @@
<template>
<el-cascader
v-model="value"
:disabled="disabled"
:options="deptOptions"
@change="handleChange"
/>
</template>
<script>
import { queryDeptSelectProDataSource } from '@/api/system/component'
import CsMessage from '@/utils/elementui/CsMessage'
export default {
name: 'CuteProductLineSelectPro',
props: {
value: {
type: Array,
default: null
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
deptOptions: [],
selectedValue: this.value
}
},
watch: {
value(newVal) {
this.selectedValue = newVal
}
},
created() {
this.fetchDeptData()
},
methods: {
// 递归清理空的children属性
cleanEmptyChildren(data) {
return data.map(item => {
const newItem = { ...item }
if (newItem.children && newItem.children.length > 0) {
// 递归处理子节点
newItem.children = this.cleanEmptyChildren(newItem.children)
} else {
// 删除空的children属性
delete newItem.children
}
return newItem
})
},
fetchDeptData() {
queryDeptSelectProDataSource().then(data => {
this.deptOptions = this.cleanEmptyChildren(data)
console.error('deptOptions', this.deptOptions)
}).catch(error => {
console.error('获取部门数据失败:', error)
CsMessage.Error('获取部门数据失败')
})
},
handleChange(value) {
this.selectedValue = value
// 绑定change事件
this.$emit('change', value)
// 绑定form value
this.$emit('input', value)
}
}
}
</script>
@@ -73,40 +73,15 @@
</el-col>
<div style="clear: both" />
</el-row>
<cute-preview-drawer ref="detailDrawer" :title="currentTemplateData.name">
<el-timeline>
<el-timeline-item timestamp="2018/4/12" placement="top">
<el-card>
<h4>更新 Github 模板</h4>
<p>王小虎 提交于 2018/4/12 20:46</p>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="2018/4/3" placement="top">
<el-card>
<h4>更新 Github 模板</h4>
<p>王小虎 提交于 2018/4/3 20:46</p>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="2018/4/2" placement="top">
<el-card>
<h4>更新 Github 模板</h4>
<p>王小虎 提交于 2018/4/2 20:46</p>
</el-card>
</el-timeline-item>
</el-timeline>
</cute-preview-drawer>
</div>
</template>
<script>
import dayjs from 'dayjs'
import CutePreviewDrawer from '@/views/components/dev/CutePreviewDrawer'
import { mapGetters } from 'vuex'
import CsMessage from '@/utils/elementui/CsMessage'
import { retryPipeline } from '@/api/devops/pipelineInstance'
export default {
name: 'CutePipelineNode',
components: { CutePreviewDrawer },
props: {
templateData: {
type: Object,
@@ -309,8 +284,7 @@ export default {
CsMessage.Warning('当前流水线节点不支持查看明细')
return
}
console.log('templateData', this.templateData)
this.$refs.detailDrawer.show()
this.$emit('node-click', this.templateData)
},
onNodeRetryClick() {
const currentTemplateData = this.currentTemplateData || { retry: false }
@@ -322,12 +296,11 @@ export default {
...this.currentInstanceData,
code: this.currentTemplateData.code
}
// console.error('data', data)
retryPipeline(data)
this.$emit('retry', data)
this.$emit('node-retry', data)
},
onNodeOperationClick(buttonInfo) {
console.log('buttonInfo', buttonInfo)
const currentTemplateData = this.currentTemplateData || {}
this.$emit('node-opera', currentTemplateData, buttonInfo)
}
}
}