改正报错信息

pull/2/head
张腾 2024-08-27 00:17:01 +08:00
parent bbe6e492f3
commit 226cd9eef1
4 changed files with 49 additions and 15 deletions

View File

@ -12,7 +12,6 @@
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
@ -38,6 +37,7 @@
"url": "https://gitee.com/y_project/MuYu-Cloud.git"
},
"dependencies": {
"@antv/x6": "^2.18.1",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.8",
@ -50,19 +50,19 @@
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
"lodash": "4.17.15",
"nprogress": "0.2.0",
"quill": "1.3.7",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"vue": "2.6.12",
"vue-codemirror": "^4.0.6",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuex": "3.6.0",
"lodash": "4.17.15",
"vue-codemirror": "^4.0.6"
"vuex": "3.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",

View File

@ -1,9 +1,10 @@
import request from "@/utils/request";
export function showTask() {
export function showTask(params) {
return request({
url: '/integration/task/selectAll',
method: 'get',
params
})
}

View File

@ -1,6 +1,28 @@
<template>
<div>
<h1 style="color: #00afff" align="center">发布任务</h1>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="任务名称">
<el-input v-model="formInline.name" placeholder="请输入任务名称"></el-input>
</el-form-item>
<el-form-item label="任务权重">
<el-select v-model="formInline.weight" placeholder="任务权重">
<el-option label="紧急" value="1"></el-option>
<el-option label="正常" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="任务执行状态">
<el-select v-model="formInline.processStatus" placeholder="任务执行状态">
<el-option label="待执行" value="1"></el-option>
<el-option label="已就绪" value="2"></el-option>
<el-option label="执行中" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" style="width: 100%">
<el-table-column label="编号" width="180">
<template slot-scope="scope">
@ -14,7 +36,8 @@
</el-table-column>
<el-table-column label="任务权重级别" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.weight }}</span>
<span style="margin-left: 10px" v-if="scope.row.weight == 1"></span>
<span style="margin-left: 10px" v-if="scope.row.weight == 2"></span>
</template>
</el-table-column>
<el-table-column label="任务执行状态" width="180">
@ -58,7 +81,8 @@
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@click="handleEdit(scope.$index, scope.row)">编辑节点</el-button>
<br>
<el-button
size="mini"
type="danger"
@ -78,12 +102,12 @@
<el-radio-button label="top">顶部对齐</el-radio-button>
</el-radio-group>
<div style="margin: 20px;"></div>
<el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
<el-form :label-position="labelPosition" label-width="80px" :model="task">
<el-form-item label="任务名称">
<el-input v-model="formLabelAlign.name"></el-input>
<el-input v-model="task.name"></el-input>
</el-form-item>
<el-form-item label="任务权重">
<el-input v-model="formLabelAlign.weight"></el-input>
<el-input v-model="task.weight"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -108,7 +132,12 @@ export default {
//"
return {
formLabelAlign:{},
formInline:{
name : "",
weight : "",
processStatus : ""
},
task:{},
labelPosition: 'right',
tableData:[],
dialogVisible: false
@ -120,12 +149,15 @@ export default {
watch: {},
//",
methods: {
onSubmit(){
this.getData()
},
toAdd(){
this.dialogVisible = true
},
doAdd(){
this.dialogVisible = false
addTask(this.formLabelAlign).then(res =>{
addTask(this.task).then(res =>{
if (res.code == 200){
this.$message.success("添加任务成功")
location.reload()
@ -135,12 +167,13 @@ export default {
})
},
getData(){
showTask().then(res => {
showTask(this.formInline).then(res => {
this.tableData = res.data
})
},
handleEdit(index, row) {
console.log(index, row);
let url = `http://21.12.0.10/easyFlow`
window.open(url,"_blank")
},
handleDelete(index, row) {
console.log(index, row);

View File

@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://21.12.0.10/prod-api`,
target: `http://21.12.0.10`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''