Merge remote-tracking branch 'origin/master'

master
chaiyapeng 2024-08-28 18:44:16 +08:00
commit 735c97d716
15 changed files with 719 additions and 27 deletions

View File

@ -36,7 +36,17 @@
"url": "https://gitee.com/y_project/MuYu-Cloud.git" "url": "https://gitee.com/y_project/MuYu-Cloud.git"
}, },
"dependencies": { "dependencies": {
"@antv/x6": "^2.18.1",
"@antv/x6-plugin-clipboard": "^2.1.6",
"@antv/x6-plugin-history": "^2.2.4",
"@antv/x6-plugin-keyboard": "^2.2.3",
"@antv/x6-plugin-selection": "^2.2.2",
"@antv/x6-plugin-snapline": "^2.1.7",
"@antv/x6-plugin-stencil": "^2.1.5",
"@antv/x6-plugin-transform": "^2.1.8",
"@antv/x6-vue-shape": "^2.1.2",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@vue/composition-api": "^1.7.2",
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "3.25.3", "core-js": "3.25.3",
@ -45,6 +55,7 @@
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"insert-css": "^2.0.0",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",

View File

@ -10,7 +10,7 @@ import ThemePicker from "@/components/ThemePicker";
export default { export default {
name: "App", name: "App",
components: {ThemePicker}, components: { ThemePicker },
metaInfo() { metaInfo() {
return { return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
@ -25,4 +25,13 @@ export default {
#app .theme-picker { #app .theme-picker {
display: none; display: none;
} }
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
width: 100%;
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
</style> </style>

View File

@ -30,6 +30,16 @@ export function userRecharge(data) {
}) })
} }
// 充值用户余额记录
export function createRechargeRecord(data) {
return request({
url: '/system/aliyun/pay/records',
method: 'post',
data: data
})
}
// 查询用户余额 // 查询用户余额
export function userBalance(userId) { export function userBalance(userId) {
return request({ return request({

View File

@ -60,4 +60,14 @@ export function findStructureList(tableId) {
}) })
} }
//添加节点任务记录
export function addTaskInput(data) {
return request({
url: "/task/taskInput/addTaskInput",
method: "POST",
data:data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -47,7 +47,7 @@ export const constantRoutes = [
children: [// 父级路由下面还有子路由 children: [// 父级路由下面还有子路由
{ {
path: 'index/:id',// 这个index可以自己定义 path: 'index/:id',// 这个index可以自己定义
component: () => import('@/views/task/task/easyFlow.vue'), component: () => import('@/views/task/task/antvX6.vue'),
name: "easyFlow", name: "easyFlow",
meta: { title: '设计', icon: 'dashboard', activeMenu: '/task/task' } meta: { title: '设计', icon: 'dashboard', activeMenu: '/task/task' }
} }

View File

@ -55,6 +55,7 @@
<template slot="label"><i class="el-icon-user"></i>描述</template> <template slot="label"><i class="el-icon-user"></i>描述</template>
{{ customer.engineMaintenanceId }} {{ customer.engineMaintenanceId }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider content-position="left">规则引擎版本</el-divider> <el-divider content-position="left">规则引擎版本</el-divider>
</div> </div>

View File

@ -2,6 +2,21 @@
<div style="padding: 20px;"> <div style="padding: 20px;">
<h1 style="text-align: center; margin-bottom: 30px;">充值明细</h1> <h1 style="text-align: center; margin-bottom: 30px;">充值明细</h1>
<el-divider></el-divider> <el-divider></el-divider>
<el-row>
<el-col :span="50"></el-col>
<el-col :span="5" :offset="15">
<el-button
v-hasPermi="['system:pay:export']"
icon="el-icon-download"
plain
size="mini"
type="warning"
@click="handleExport"
>导出
</el-button>
</el-col>
</el-row>
<el-table <el-table
:data="listDate" :data="listDate"
style="width: 100%; border-collapse: collapse;"> style="width: 100%; border-collapse: collapse;">
@ -40,7 +55,7 @@
<el-table-column <el-table-column
label="充值时间" label="充值时间"
width="300" width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;"> style="border: 1px solid #ca8a8a; padding: 10px; text-align: center;">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createTime }} {{ scope.row.createTime }}
</template> </template>
@ -76,12 +91,19 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 导出按钮操作 */
handleExport() {
this.download('system/user/export', {
...this.queryParams
}, `pay_${new Date().getTime()}.xlsx`)
},
getList() { getList() {
userPayinfo(this.addDateRange(this.queryParams)).then(response => { userPayinfo(this.addDateRange(this.queryParams)).then(response => {
this.listDate = response.data.rows; this.listDate = response.data.rows;
this.total = response.data.total; this.total = response.data.total;
} }
);} );
}
} }
} }
</script> </script>

View File

@ -3,8 +3,8 @@
<ul class="msg-box"> <ul class="msg-box">
<li> <li>
<h1 style="margin-bottom: 15px;">充值说明</h1> <h1 style="margin-bottom: 15px;">充值说明</h1>
<h4>你敢充钱,我就敢让你没钱</h4> <h4>请输入支付宝沙箱账号</h4>
<h4>子龙说你得有个小目标</h4> <h4>西伯利亚龙</h4>
</li> </li>
<li> <li>
<h4 style="margin-bottom: 15px;">支付金额</h4> <h4 style="margin-bottom: 15px;">支付金额</h4>

View File

@ -0,0 +1,648 @@
<template>
<div class="dashboard-container">
<p>选择节点</p>
<div class="antvBox">
<div class="menu-list">
<div v-for="item in moduleList"
:key="item.id"
draggable="true"
@click="pop(item)"
@dragend="handleDragEnd($event, item)">
<img :src="item.image" alt="" />
<p>{{ item.name }}</p>
</div>
</div>
<div class="canvas-card">
<div id="container" />
</div>
</div>
<el-button @click="save()"></el-button>
<!-- 添加任务详情设计-->
<el-dialog title="添加表" :visible.sync="taskInputAdd">
<el-form label-width="80px" :model="tableInfo" ref="queryForm" :inline="true" class="demo-form-inline" size="small">
<el-form-item label="任务id">
<el-input v-model="tableInfo.id"></el-input>
</el-form-item>
<el-form-item label="数据库id">
<el-input v-model="tableInfo.databaseId"></el-input>
</el-form-item>
<!-- <el-form-item label="数据表">-->
<div class="block">
<span class="demonstration">选择数据表</span>
<el-cascader
v-model="value"
:options="tableList"
@change="handleChange(value)"></el-cascader>
</div>
<!-- <el-select @change="changeTableName(tableInfo.tableName)" v-model="tableInfo.tableName" placeholder="请选择等级">-->
<!-- <el-option label="请选择" value="0"></el-option>-->
<!-- <span v-for="table in tableList">-->
<!-- <el-option :label=table.tableName :value=table.id :key=table.id></el-option>-->
<!-- </span>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="表别名">
<el-input v-model="tableInfo.tableRemark"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="taskInputAdd = false"> </el-button>
<el-button type="primary" @click="addTaskInput()"></el-button>
</div>
</el-dialog>
<!-- 字段选择列表-->
<el-dialog title="添加表" :visible.sync="taskInputFieldAdd">
<el-table
:data="structureList"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
label="字段"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnName }}</span>
</template>
</el-table-column>
<el-table-column
label="注释"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnRemark }}</span>
</template>
</el-table-column>
<el-table-column
label="是否主键"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.isPrimary }}</span>
</template>
</el-table-column>
<el-table-column
label="字段类型"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnType }}</span>
</template>
</el-table-column>
<el-table-column
label="字段长度"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnLength }}</span>
</template>
</el-table-column>
<el-table-column
label="小数"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnDecimals }}</span>
</template>
</el-table-column>
<el-table-column
label="非空"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.isNull }}</span>
</template>
</el-table-column>
<el-table-column
label="默认值"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.defaultValue }}</span>
</template>
</el-table-column>
<el-table-column
label="是否字典"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.isDictionary }}</span>
</template>
</el-table-column>
<el-table-column
label="处理规则"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.weigh ==1 "></span>
<span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">aa</span>
<span style="margin-left: 10px" v-if="scope.row.weigh ==3 "></span>
<span style="margin-left: 10px" v-if="scope.row.weigh ==4 "></span>
</template>
</el-table-column>
<el-table-column
label="表别名"
width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.fieldAsEngineId"></el-input>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelColumn()"> </el-button>
<el-button type="primary" @click="columnAddGood()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { Graph } from "@antv/x6";
import { findByTableId, findStructureList, tableInfoList } from '@/api/task/task'
export default {
name: "antvX6",
data() {
return {
taskId:this.$route.params.id,
dialogFormVisible:false,
//
taskInputAdd:false,
//
taskInputFieldAdd:false,
taskReq:{
},
taskAddReq:{},
taskInputReq:{},
taskList:[],
//
value:[],
tableList:[],
structureList:[],
tableInfo:{},
moduleList: [
{
id: 1,
name: "开始",
image: require("@/assets/img/1.png"),
},
{
id: 2,
name: "表",
image: require("@/assets/img/2.png"),
},
{
id: 3,
name: "联查",
image: require("@/assets/img/3.png"),
},
{
id: 4,
name: "结束",
image: require("@/assets/img/4.png"),
},
],
graph:null,
columnList:[],
nodeId:0,
};
},
//
mounted() {
this.initGraph();
},
methods: {
//
columnAddGood(){
this.taskInputFieldAdd = false;
console.log(this.structureList)
const cellById = this.graph.getCellById(this.nodeId)
console.log(this.columnList)
cellById.setData(this.columnList);
console.log(cellById);
this.columnList=[];
this.structureList=[];
this.tableList=[];
},
//
handleChange(value) {
console.log(value)
findStructureList(value[1]).then(res=>{
this.structureList = res.data;
})
},
//
cancelColumn(){
this.taskInputFieldAdd = false;
this.columnList=[];
},
//
handleSelectionChange(val) {
this.columnList = val;
},
//
pop(item){
console.log(item)
if(item.id == 1){
this.taskInputAdd = true;
this.tableInfoList();
}
},
//
toDesign(row){
this.$router.push({path:'/easyFlow'});
},
//
changeTableName(row){
findByTableId(row).then(res=>{
this.tableInfo = res.data;
})
},
//
tableInfoList(){
tableInfoList().then(res=>{
this.tableList = res.data;
});
},
executeTask(){
this.taskInputAdd = true;
this.tableInfoList();
},
addTaskInput(){
this.taskInputAdd = false;
if(this.structureList == null){
return;
}
this.taskInputFieldAdd = true;
},
//
save() {
console.log(this.graph.toJSON(), "graph");
console.log(this.graph.getNodes(), "node");
},
//
handleDragEnd(e, item) {
console.log(e, item); //
this.addHandleNode(
e.pageX - 500,
e.pageY - 200,
new Date().getTime(),
item.image,
item.name
);
},
nodeAddEvent() {
const { graph } = this;
const container = document.getElementById("container");
const changePortsVisible = (visible) => {
const ports = container.querySelectorAll(".x6-port-body");
for (let i = 0, len = ports.length; i < len; i = i + 1) {
ports[i].style.visibility = visible ? "visible" : "hidden";
}
};
this.graph.on("node:mouseenter", () => {
changePortsVisible(true);
});
this.graph.on("node:mouseleave", () => {
changePortsVisible(false);
});
//
this.graph.on("node:click", ({ e, x, y, node, view }) => {
console.log("点击!!!", node);
//
if (this.curSelectNode) {
//
this.curSelectNode.removeTools();
//
if (this.curSelectNode !== node) {
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
this.curSelectNode = node;
} else {
this.curSelectNode = null;
}
} else {
this.curSelectNode = node;
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
}
});
//
this.graph.on("node:contextmenu",(evt)=>{
const data = evt.node.store.data;
if (data.name=="表"){
alert("a")
}
alert("b")
this.executeTask();
// var id = node.id;
});
// 线
this.graph.on("cell:mouseenter", ({ cell }) => {
if (cell.shape == "edge") {
cell.addTools([
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
cell.setAttrs({
line: {
stroke: "#409EFF",
},
});
cell.zIndex = 99; // 线
}
});
this.graph.on("cell:mouseleave", ({ cell }) => {
if (cell.shape === "edge") {
cell.removeTools();
cell.setAttrs({
line: {
stroke: "black",
},
});
cell.zIndex = 1; // 线线
}
});
},
//
addHandleNode(x, y, id, image, name ) {
this.graph.addNode({
id: id,
shape: "image", // 使 'rect'
x: x,
y: y,
width: 60,
height: 60,
imageUrl: image,
attrs: {
body: {
stroke: "#ffa940",
fill: "#ffd591",
},
label: {
textWrap: {
width: 90,
text: name,
},
fill: "black",
fontSize: 12,
refX: 0.5,
refY: "100%",
refY2: 4,
textAnchor: "middle",
textVerticalAnchor: "top",
},
},
ports: {
groups: {
group1: {
position: [30, 30],
},
},
items: [
{
group: "group1",
id: "port1",
attrs: {
circle: {
r: 6,
magnet: true,
stroke: "#ffffff",
strokeWidth: 2,
fill: "#5F95FF",
},
},
},
],
},
zIndex: 10,
data:null,
});
},
//
initGraph() {
const container = document.getElementById("container");
this.graph = new Graph({
container: container, //
width: container.offsetWidth, //
height: container.offsetHeight, //
background: false, //
snapline: true, // 线
// 线
connecting: {
snap: true, //
allowBlank: false, //
allowMulti: true, //
allowLoop: true, // 线
highlight: true, //
highlighting: {
magnetAdsorbed: {
name: "stroke",
args: {
attrs: {
fill: "#5F95FF",
stroke: "#5F95FF",
},
},
},
},
router: {
//
name: "orth",
},
connector: {
//
name: "rounded",
args: {
radius: 8,
},
},
},
panning: {
enabled: false,
},
mousewheel: {
enabled: true, //
zoomAtMousePosition: true,
modifiers: "ctrl",
minScale: 0.5,
maxScale: 3,
},
grid: {
type: "dot",
size: 20, // 10px
visible: true, //
args: {
color: "#a0a0a0", // 线/
thickness: 2, // 线/
},
},
});
this.nodeAddEvent();
},
},
};
</script>
<style lang="scss" scoped>
.dashboard-container {
.antvBox {
display: flex;
width: 100%;
height: 100%;
color: black;
padding-top: 20px;
.menu-list {
height: 100%;
width: 300px;
padding: 0 10px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-content: flex-start;
flex-wrap: wrap;
> div {
margin-bottom: 10px;
border-radius: 5px;
padding: 0 10px;
box-sizing: border-box;
cursor: pointer;
color: black;
width: 105px;
display: flex;
flex-wrap: wrap;
justify-content: center;
img {
height: 50px;
width: 50px;
}
P {
width: 90px;
text-align: center;
}
}
}
.canvas-card {
width: 1700px;
height: 750px;
box-sizing: border-box;
> div {
width: 1400px;
height: 750px;
border: 2px dashed #2149ce;
}
}
}
}
</style>

View File

@ -399,7 +399,7 @@ export default {
methods: { methods: {
// //
toDesign(row){ toDesign(row){
this.$router.push({path:'/easyFlow'}); this.$router.push({path:'/easyFlow/index/:'+row.id});
}, },
// //

View File

@ -1,15 +1,7 @@
<template> <template>
<div> <div>
<!-- 添加或修改规则引擎对话框 --> <!-- 添加或修改规则引擎对话框 -->
<el-button type="text" @click="dialogFormVisible = true">添加规则类型</el-button> <el-button type="text" @click="dialogFormVisible = true">添加规则类型</el-button>
<el-dialog title="添加规则" :visible.sync="dialogFormVisible"> <el-dialog title="添加规则" :visible.sync="dialogFormVisible">
@ -18,7 +10,7 @@
<el-form-item label="规则名称" :label-width="formLabelWidth"> <el-form-item label="规则名称" :label-width="formLabelWidth">
<el-input v-model="form.name" autocomplete="off"></el-input> <el-input v-model="type.name" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
@ -75,16 +67,6 @@ export default {
name: [{required: true, message: '请输入规则名称', trigger: 'blur'}] name: [{required: true, message: '请输入规则名称', trigger: 'blur'}]
}, },
dialogFormVisible:false, dialogFormVisible:false,
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
},
formLabelWidth: '120px' formLabelWidth: '120px'
}; };
}, },
@ -102,7 +84,6 @@ export default {
} }
}, },
submitForm(){ submitForm(){
this.type = {}
this.dialogFormVisible=true this.dialogFormVisible=true
insert(this.type).then(res =>{ insert(this.type).then(res =>{
this.$message.success(res.msg || "添加成功") this.$message.success(res.msg || "添加成功")