增加群机器人通知等功能

This commit is contained in:
aixianling
2022-12-28 17:50:17 +08:00
parent 30a77df14e
commit 8a830a53d9
2 changed files with 17 additions and 8 deletions

View File

@@ -236,11 +236,11 @@ export default {
},
data() {
return {
form: {apps: [], type: null, sysInfo: {}},
form: {apps: [], type: null, sysInfo: {}, customPath: ""},
rules: {
name: {required: true, message: "请输入"},
type: {required: true, message: "请选择"},
customPath: {required: true, message: "请输入"},
// customPath: {required: true, message: "请输入"},
},
colConfigs: [
{prop: 'text', label: "名称"},

View File

@@ -6,6 +6,7 @@
<ai-search-bar>
<template #left>
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd()">添加</el-button>
<ai-select placeholder="系统类型" v-model="search.type" :selectList="dict.getDict('systemType')" @change="page.current=1,getTableData()"/>
</template>
<template #right>
<el-input size="small" placeholder="搜索" v-model="search.name" clearable @change="page.current=1,getTableData()"/>
@@ -19,15 +20,14 @@
<el-progress v-else :percentage="row.count"/>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" fixed="right" width="300" header-align="center">
<el-table-column slot="options" label="操作" fixed="right" width="320" header-align="center">
<template slot-scope="{row}">
<el-button type="text" @click="handleAdd(row.id)">编辑</el-button>
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
<template v-if="!!row.dist">
<el-button type="text" @click="handleUpdate(row)" v-if="row.count==0">打包更新</el-button>
<el-button type="text" @click="handleCancelUpdate(row)" v-else>停止</el-button>
<el-button type="text" @click="handleDownload(row)" v-if="row.dist">下载</el-button>
</template>
<el-button type="text" @click="handleUpdate(row)" v-if="row.count==0">打包更新</el-button>
<el-button type="text" @click="handleCancelUpdate(row)" v-else>停止</el-button>
<el-button type="text" @click="handleDownload(row)" v-if="row.download&&!row.error">下载</el-button>
<el-button type="text" @click="handleNotice(row.id)">通知</el-button>
</template>
</el-table-column>
</ai-table>
@@ -164,6 +164,15 @@ export default {
}).then(res => {
if (res?.data) return res.data
})
},
handleNotice(id) {
this.instance.post("/node/custom/webhook", null, {
params: {id}
}).then(res => {
if (res?.code == 0) {
this.$message.success("消息发送成功!")
}
})
}
},
created() {