lcr 5 месяцев назад
Родитель
Сommit
d6d8252b17
13 измененных файлов: 488 добавлений и 28 удалений
  1. +1
    -1
      .env.development
  2. +2
    -2
      .env.production
  3. +2
    -2
      .env.staging
  4. +1
    -1
      package.json
  5. +9
    -0
      src/api/business/ctApply.js
  6. +44
    -0
      src/api/business/ctApplyPlan.js
  7. +10
    -0
      src/api/business/ctRebot.js
  8. +1
    -1
      src/layout/components/Sidebar/Logo.vue
  9. +28
    -18
      src/views/business/ctApply/index.vue
  10. +387
    -0
      src/views/business/ctApplyPlan/index.vue
  11. +1
    -1
      src/views/business/ctRebot/index.vue
  12. +1
    -1
      src/views/login.vue
  13. +1
    -1
      src/views/register.vue

+ 1
- 1
.env.development Просмотреть файл

@@ -4,7 +4,7 @@ VUE_APP_TITLE = 影刀后台管理系统
# 开发环境配置
ENV = 'development'

# 后台管理系统/开发环境
# 影刀后台管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'

# 路由懒加载


+ 2
- 2
.env.production Просмотреть файл

@@ -1,8 +1,8 @@
# 页面标题
VUE_APP_TITLE = 后台管理系统
VUE_APP_TITLE = 影刀后台管理系统

# 生产环境配置
ENV = 'production'

# 后台管理系统/生产环境
# 影刀后台管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'

+ 2
- 2
.env.staging Просмотреть файл

@@ -1,10 +1,10 @@
# 页面标题
VUE_APP_TITLE = 后台管理系统
VUE_APP_TITLE = 影刀后台管理系统

NODE_ENV = production

# 测试环境配置
ENV = 'staging'

# 后台管理系统/测试环境
# 影刀后台管理系统/测试环境
VUE_APP_BASE_API = '/stage-api'

+ 1
- 1
package.json Просмотреть файл

@@ -1,7 +1,7 @@
{
"name": "ruoyi",
"version": "3.8.5",
"description": "后台管理系统",
"description": "影刀后台管理系统",
"author": "若依",
"license": "MIT",
"scripts": {


+ 9
- 0
src/api/business/ctApply.js Просмотреть файл

@@ -11,6 +11,15 @@ export function syn() {
}


// 查询所有应用列表
export function listApplyAll(query) {
return request({
url: '/business/ctApply/listAll',
method: 'get',
params: query
})
}

// 查询应用信息管理列表
export function listCtApply(query) {
return request({


+ 44
- 0
src/api/business/ctApplyPlan.js Просмотреть файл

@@ -0,0 +1,44 @@
import request from '@/utils/request'

// 查询应用执行计划管理列表
export function listCtApplyPlan(query) {
return request({
url: '/business/ctApplyPlan/list',
method: 'get',
params: query
})
}

// 查询应用执行计划管理详细
export function getCtApplyPlan(id) {
return request({
url: '/business/ctApplyPlan/' + id,
method: 'get'
})
}

// 新增应用执行计划管理
export function addCtApplyPlan(data) {
return request({
url: '/business/ctApplyPlan',
method: 'post',
data: data
})
}

// 修改应用执行计划管理
export function updateCtApplyPlan(data) {
return request({
url: '/business/ctApplyPlan',
method: 'put',
data: data
})
}

// 删除应用执行计划管理
export function delCtApplyPlan(id) {
return request({
url: '/business/ctApplyPlan/' + id,
method: 'delete'
})
}

+ 10
- 0
src/api/business/ctRebot.js Просмотреть файл

@@ -9,6 +9,16 @@ export function syn() {
})
}


// 查询所有可用机器人
export function listRebotAll(query) {
return request({
url: '/business/ctRebot/listAll',
method: 'get',
params: query
})
}

// 查询机器人管理列表
export function listCtRebot(query) {
return request({


+ 1
- 1
src/layout/components/Sidebar/Logo.vue Просмотреть файл

@@ -35,7 +35,7 @@ export default {
},
data() {
return {
title: '后台管理系统',
title: '影刀后台管理系统',
logo: logoImg
}
}


+ 28
- 18
src/views/business/ctApply/index.vue Просмотреть файл

@@ -21,6 +21,14 @@
<el-option v-for="dict in dict.type.app_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input
v-model="queryParams.deptName"
placeholder="请输入部门名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -46,11 +54,7 @@
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="应用所有者名称" align="center" prop="ownerName" width="120" />
<el-table-column label="应用所有者账号" align="center" prop="ownerAccount" width="200" />
<el-table-column label="所有者id" align="center" prop="ownerId" width="300" />
<el-table-column label="appid" align="center" prop="appId" width="300" />
<el-table-column label="应用名称" align="center" prop="appName" width="200" />
<el-table-column label="应用名称" align="center" prop="appName" width="300" />
<el-table-column label="应用类型名称" align="center" prop="appTypeName" width="100" />
<el-table-column label="应用类型枚举" align="center" prop="appType" width="100">
<template slot-scope="scope">
@@ -59,6 +63,10 @@
</el-table-column>
<el-table-column label="应用创建时间" align="center" prop="appCreateTime" width="100" />
<el-table-column label="应用修改时间" align="center" prop="appUpdateTime" width="100" />
<el-table-column label="应用所有者名称" align="center" prop="ownerName" width="120" />
<el-table-column label="应用所有者账号" align="center" prop="ownerAccount" width="200" />
<el-table-column label="所有者id" align="center" prop="ownerId" width="300" />
<el-table-column label="appid" align="center" prop="appId" width="300" />
<el-table-column label="版本" align="center" prop="version" width="100" />
<el-table-column label="是否支持应用参数" align="center" prop="supportParam" width="200">
<template slot-scope="scope">
@@ -70,8 +78,10 @@
</span>
</template>
</el-table-column>
<el-table-column label="icon图下载地址" align="center" prop="icon" width="200" />
<!-- <el-table-column label="icon图下载地址" align="center" prop="icon" width="200" /> -->
<el-table-column label="预计人工耗时(分钟)" align="center" prop="manualTime" width="100" />
<el-table-column label="部门id" align="center" prop="deptId" width="100"/>
<el-table-column label="部门名称" align="center" prop="deptName" width="100"/>
<el-table-column label="创建者" align="center" fixed="right" prop="createBy" width="100" />
<el-table-column label="创建时间" align="center" fixed="right" prop="createTime" width="100">
<template slot-scope="scope">
@@ -113,18 +123,6 @@
<!-- 添加或修改应用信息管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="应用所有者名称" prop="ownerName">
<el-input v-model="form.ownerName" placeholder="请输入应用所有者名称" />
</el-form-item>
<el-form-item label="应用所有者账号" prop="ownerAccount">
<el-input v-model="form.ownerAccount" placeholder="请输入应用所有者账号" />
</el-form-item>
<el-form-item label="所有者id" prop="ownerId">
<el-input v-model="form.ownerId" placeholder="请输入所有者id" />
</el-form-item>
<el-form-item label="appid" prop="appId">
<el-input v-model="form.appId" placeholder="请输入appid" />
</el-form-item>
<el-form-item label="应用名称" prop="appName">
<el-input v-model="form.appName" placeholder="请输入应用名称" />
</el-form-item>
@@ -147,6 +145,18 @@
placeholder="请选择应用修改时间">
</el-date-picker>
</el-form-item>
<el-form-item label="应用所有者名称" prop="ownerName">
<el-input v-model="form.ownerName" placeholder="请输入应用所有者名称" />
</el-form-item>
<el-form-item label="应用所有者账号" prop="ownerAccount">
<el-input v-model="form.ownerAccount" placeholder="请输入应用所有者账号" />
</el-form-item>
<el-form-item label="所有者id" prop="ownerId">
<el-input v-model="form.ownerId" placeholder="请输入所有者id" />
</el-form-item>
<el-form-item label="appid" prop="appId">
<el-input v-model="form.appId" placeholder="请输入appid" />
</el-form-item>
<el-form-item label="版本,值内容:未发版、版本" prop="version">
<el-input v-model="form.version" placeholder="请输入版本,值内容:未发版、版本" />
</el-form-item>


+ 387
- 0
src/views/business/ctApplyPlan/index.vue Просмотреть файл

@@ -0,0 +1,387 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="计划名称" prop="planName">
<el-input v-model="queryParams.planName" placeholder="请输入计划名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="执行类型" prop="planType">
<el-select v-model="queryParams.planType" placeholder="请选择执行类型" clearable>
<el-option v-for="dict in dict.type.plan_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="机器人名称" prop="robotName">
<el-input v-model="queryParams.robotName" placeholder="请输入计划执行的机器人名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="应用类型名称" prop="appTypeName">
<el-input v-model="queryParams.appTypeName" placeholder="请输入应用类型名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="应用名称" prop="appName">
<el-input v-model="queryParams.appName" placeholder="请输入应用名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="appid" prop="appId">
<el-input v-model="queryParams.appId" placeholder="请输入appid" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="执行类型" prop="excType">
<el-select v-model="queryParams.excType" placeholder="请选择执行类型" clearable>
<el-option
v-for="dict in dict.type.exc_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model="queryParams.priority" placeholder="请输入优先级" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>

<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['business:ctApplyPlan:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['business:ctApplyPlan:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['business:ctApplyPlan:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['business:ctApplyPlan:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

<el-table v-loading="loading" :data="ctApplyPlanList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed="left" />
<el-table-column label="序号" width="55" align="center" fixed="left">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="计划名称" align="center" prop="planName" width="100" />
<el-table-column label="执行类型" align="center" prop="planType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.plan_type" :value="scope.row.planType" />
</template>
</el-table-column>
<el-table-column label="机器人名称" align="center" prop="robotName" width="100" />
<el-table-column label="应用类型名称" align="center" prop="appTypeName" width="100" />
<el-table-column label="应用名称" align="center" prop="appName" width="250" />
<el-table-column label="appid" align="center" prop="appId" width="300" />
<el-table-column label="应用类型枚举" align="center" prop="appType" width="100" />
<el-table-column label="预计人工耗时" align="center" prop="manualTime" width="100" />
<el-table-column label="计划参数" align="center" prop="planParams" width="100" />
<el-table-column label="等待超时时间" align="center" prop="waitTimeout" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.wait_timeout" :value="scope.row.waitTimeout"/>
</template>
</el-table-column>
<el-table-column label="优先级" align="center" prop="priority" width="100" />
<el-table-column label="执行类型" align="center" prop="excType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.exc_type" :value="scope.row.excType"/>
</template>
</el-table-column>
<el-table-column label="执行时间" align="center" prop="excTime" width="100"/>
<el-table-column label="执行表达式" align="center" prop="cronExpression" width="100"/>
<el-table-column label="任务运行uuid" align="center" prop="taskUuid" width="300"/>
<el-table-column label="创建者" align="center" fixed="right" prop="createBy" width="100" />
<el-table-column label="创建时间" align="center" fixed="right" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新者" align="center" fixed="right" prop="updateBy" width="100" />
<el-table-column label="更新时间" align="center" fixed="right" prop="updateTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['business:ctApplyPlan:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['business:ctApplyPlan:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>

<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />

<!-- 添加或修改应用执行计划管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="计划名称" prop="planName">
<el-input v-model="form.planName" placeholder="请输入计划名称" />
</el-form-item>
<el-form-item label="执行类型" prop="planType">
<el-select v-model="form.planType" placeholder="请选择执行类型">
<el-option v-for="dict in dict.type.plan_type" :key="dict.value" :label="dict.label"
:disabled="dict.value == 0" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="form.planType == 0" label="机器人名称" prop="robotName">
<el-select v-model="form.robotName" multiple collapse-tags style="margin-left: 20px;" placeholder="请选择机器人">
<el-option v-for="rebot in rebotList" :key="rebot.robotClientName" :label="rebot.robotClientName"
:value="rebot.robotClientName">
</el-option>
</el-select>
<el-input v-model="form.robotName" placeholder="请输入机器人名称" />
</el-form-item>
<el-form-item label="应用名称" prop="appName">
<el-select v-model="form.appId" multiple filterable collapse-tags style="margin-left: 20px;" placeholder="请选择机器人" >
<el-option v-for="apply in applyList" :key="apply.appId" :label="apply.appName":value="apply.appId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="计划参数" prop="planParams">
<el-input v-model="form.planParams" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="等待超时时间" prop="waitTimeout">
<el-select v-model="form.waitTimeout" placeholder="请选择等待超时时间">
<el-option
v-for="dict in dict.type.wait_timeout"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="form.priority" @change="handleChange" label="请输入预计人工用时"></el-input-number>
</el-form-item>
<el-form-item label="执行类型" prop="excType">
<el-select v-model="form.excType" placeholder="请选择执行类型">
<el-option
v-for="dict in dict.type.exc_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="form.excType == 1" label="执行时间" prop="excTime">
<el-date-picker clearable
v-model="form.excTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择执行时间">
</el-date-picker>
</el-form-item>
<el-form-item v-if="form.excType == 2" label="执行表达式" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入执行表达式" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>

<script>
import { listCtApplyPlan, getCtApplyPlan, delCtApplyPlan, addCtApplyPlan, updateCtApplyPlan } from "@/api/business/ctApplyPlan";
import { listRebotAll } from "@/api/business/ctRebot";
import { listApplyAll } from "@/api/business/ctApply";

export default {
name: "CtApplyPlan",
dicts: ['plan_type', 'wait_timeout',, 'exc_type'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 应用执行计划管理表格数据
ctApplyPlanList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
planName: null,
planType: null,
robotName: null,
appTypeName: null,
appName: null,
appId: null,
appType: null,
manualTime: null,
planParams: null,
waitTimeout: null,
priority: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
},
// 机器人列表
rebotList: [],
// 应用列表
applyList: []
};
},
created() {
this.getList();
},
methods: {
/** 查询应用执行计划管理列表 */
getList() {
this.loading = true;
listCtApplyPlan(this.queryParams).then(response => {
this.ctApplyPlanList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询所有应用 */
listAll() {
this.listRebotAll();
this.listApplyAll();
},
/** 查询所有可用机器人 */
listRebotAll() {
listRebotAll({}).then(res => {
this.rebotList = res.data;
});
},
/** 查询应用 */
listApplyAll() {
listApplyAll({}).then(res => {
this.applyList = res.data;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
planName: null,
planType: null,
robotName: null,
appTypeName: null,
appName: null,
appId: null,
appType: null,
manualTime: null,
planParams: null,
waitTimeout: null,
priority: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null,
deleted: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.listAll();
this.open = true;
this.title = "添加应用执行计划";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.listAll();
const id = row.id || this.ids
getCtApplyPlan(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改应用执行计划";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCtApplyPlan(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCtApplyPlan(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除应用执行计划管理编号为"' + ids + '"的数据项?').then(function () {
return delCtApplyPlan(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('business/ctApplyPlan/export', {
...this.queryParams
}, `ctApplyPlan_${new Date().getTime()}.xlsx`)
}
}
};
</script>

+ 1
- 1
src/views/business/ctRebot/index.vue Просмотреть файл

@@ -35,7 +35,7 @@
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="机器人名称" align="center" prop="robotClientName" width="150"/>
<el-table-column label="机器人名称" align="center" prop="robotClientName" width="200"/>
<el-table-column label="机器人Uuid信息" align="center" prop="robotClientUuid" width="300"/>
<el-table-column label="运行状态" align="center" prop="status" width="100">
<template slot-scope="scope">


+ 1
- 1
src/views/login.vue Просмотреть файл

@@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">后台管理系统</h3>
<h3 class="title">影刀后台管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"


+ 1
- 1
src/views/register.vue Просмотреть файл

@@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">后台管理系统</h3>
<h3 class="title">影刀后台管理系统</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />


Загрузка…
Отмена
Сохранить