diff --git a/src/api/engine/engine.js b/src/api/engine/engine.js index 96cae7a..63cc44a 100644 --- a/src/api/engine/engine.js +++ b/src/api/engine/engine.js @@ -4,38 +4,40 @@ import request from '@/utils/request' export function selectEngineList(data){ return request({ url: "/engine/engine/getMaintenanceList", - method: "Get", - data:data - }) -} - -//导出 -export function selectSourceExport(data){ - return request({ - url: "/source/source/export", - method: "POST", + method: "post", data:data }) } -//新增 -export function insertAdd(data){ + + +export function insert(data){ return request({ - url: "/source/source/insert", - method: "get", + url: "/engine/engine/insert", + method: "post", + data:data + }) +} + +export function update(data){ + return request({ + url: "/engine/engine/update", + method: "post", data:data }) } -//获取基本信息 -export function getInfo(id){ + +export function del(id){ return request({ - url: "/source/source/id", - method: "get", + url: "/engine/engine/delete/" + id, + method: "post", + data:id }) } + diff --git a/src/api/port/port/index.js b/src/api/port/port/index.js new file mode 100644 index 0000000..f12fec6 --- /dev/null +++ b/src/api/port/port/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function getPhonePlace(data) { + return request({ + url: '/mart/list/getPhonePlace', + method: 'get', + data:data + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 89d3972..e591071 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -10,6 +10,24 @@ export function listUser(query) { }) } + +// 用户余额 +export function userRecharge(data) { + return request({ + url: '/money/alipay/recharge', + method: 'post', + params: data + }) +} + +// 查询用户余额 +export function userBalance(userId) { + return request({ + url: '/money/balance/' + userId, + method: 'get', + }) +} + // 查询用户详细 export function getUser(userId) { return request({ diff --git a/src/api/task/task.js b/src/api/task/task.js index 2acc627..9caf72a 100644 --- a/src/api/task/task.js +++ b/src/api/task/task.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -//查询规则引擎列表 +//查询任务列表 export function selectTaskList(data){ return request({ url: "/task/task/list", @@ -9,33 +9,30 @@ export function selectTaskList(data){ }) } -//导出 -export function selectSourceExport(data){ +//添加 +export function addTask(data){ return request({ - url: "/source/source/export", + url: "/task/task/addTask", method: "POST", data:data }) } - -//新增 -export function insertAdd(data){ +//修改 +export function updateById(data) { return request({ - url: "/source/source/insert", - method: "get", - data:data + url: "/task/task/updateById", + method: "POST", + data: data + }) +} + +//删除 +export function deleteByTaskId(id) { + return request({ + url: "/task/task/deleteById/" + id, + method: "POST" }) } -//获取基本信息 -export function getInfo(id){ - return request({ - url: "/source/source/id", - method: "get", - }) -} - - - diff --git a/src/views/engine/engine/index.vue b/src/views/engine/engine/index.vue index c4b0cd9..95d80bb 100644 --- a/src/views/engine/engine/index.vue +++ b/src/views/engine/engine/index.vue @@ -14,88 +14,71 @@ - + 查询 - - - - - - - - - + + 导出 + - - - - - - - - + 新增 + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + @@ -112,6 +95,7 @@ 基本类型 时间类型 普通类型 + 介入类型 @@ -146,23 +130,20 @@ @@ -175,6 +156,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,8 +199,7 @@ //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等), //例如:import 《组件名称》 from '《组件路径》, import {insertAdd} from "@/api/etl/switch"; -import {selectEngineList} from "@/api/engine/engine"; -import {selectList} from "@/api/pay/customer"; +import {del, insert, selectEngineList, update} from "@/api/engine/engine"; export default { //import引入的组件需要注入到对象中才能使用" components: {}, @@ -192,14 +208,16 @@ export default { //这里存放数据" return { - // dialogFormVisible:false, - // SourceReq:{ - // - // }, + engineReq:{ + pageNum:1, + pageSize:5 + }, engine:{ }, arr:[], + dialogFormVisible:false, + total:0 }; }, //计算属性 类似于data概念", @@ -208,15 +226,47 @@ export default { watch: {}, //方法集合", methods: { - selectList, - // insertAdd(){ - // this.dialogFormVisible=true - // }, + handleSizeChange(val) { + console.log(`每页 ${val} 条`); + this.engineReq.pageSize = val; + this.findSelectSourceList(); + }, + handleCurrentChange(val) { + console.log(`当前页: ${val}`); + this.engineReq.pageNum = val; + this.findSelectSourceList(); + }, + insert(){ + this.dialogFormVisible = true + insert(this.engine).then(res =>{ + this.$message.success(res.msg || "添加成功") + }) + this.engine = {} + }, findSelectSourceList(){ - selectEngineList().then(res=>{ - this.arr=res.data; + selectEngineList(this.engineReq).then(res=>{ + this.arr=res.data.list; + this.total=res.data.total; }) }, + handleDelete(id){ + del(id).then(res =>{ + this.$message.success(res.msg || "删除成功") + }) + }, + handUpdate(){ + update(this.engine).then(res =>{ + this.$message.success(res.msg || "修改成功") + }) + }, + findSelectSourceExport(){ + this.download('engine/engine/export', { + ...this.engineReq + }, `source_${new Date().getTime()}.xlsx`) + }, + select(){ + this.findSelectSourceList(); + } }, //生命周期 - 创建完成(可以访问当前this实例)", created() { diff --git a/src/views/etl/switch/index.vue b/src/views/etl/switch/index.vue index bd6a1a0..694994d 100644 --- a/src/views/etl/switch/index.vue +++ b/src/views/etl/switch/index.vue @@ -347,7 +347,6 @@ export default { this.download('source/source/export', { ...this.SourceReq }, `source_${new Date().getTime()}.xlsx`) - // selectSourceExport(this.SourceReq).then(); }, handleSelectionChange(row){ this.ids=[]; diff --git a/src/views/money/user/index.vue b/src/views/money/user/index.vue new file mode 100644 index 0000000..afa3c3f --- /dev/null +++ b/src/views/money/user/index.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/port/port/index.vue b/src/views/port/port/index.vue new file mode 100644 index 0000000..9f4e7be --- /dev/null +++ b/src/views/port/port/index.vue @@ -0,0 +1,114 @@ + + + + diff --git a/src/views/task/task/index.vue b/src/views/task/task/index.vue index 33b30cd..22f6b11 100644 --- a/src/views/task/task/index.vue +++ b/src/views/task/task/index.vue @@ -15,7 +15,7 @@ - + @@ -28,24 +28,18 @@ - - - - - - - - - - 新增 - + + 新增 + + @@ -122,7 +116,6 @@ 待执行 正在执行 执行完毕 - {{ scope.row.status }} @@ -133,7 +126,6 @@ 待执行 正在执行 执行完毕 - {{ scope.row.status }} @@ -145,7 +137,7 @@ icon="el-icon-pear" size="mini" type="text" - @click="update(scope.row)">执行 + @click="executeTask(scope.row)">执行 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -175,7 +306,7 @@ import {selectSourceExport} from "@/api/etl/switch"; import {connectionTest} from "@/api/etl/switch"; import {insertAdd} from "@/api/etl/switch"; import {getInfo} from "@/api/etl/switch"; -import { selectTaskList } from '@/api/task/task' +import { addTask, deleteById, deleteByTaskId, selectTaskList, updateById } from '@/api/task/task' export default { //import引入的组件需要注入到对象中才能使用" @@ -186,10 +317,17 @@ export default { return { dialogFormVisible:false, + //任务设计添加表弹窗 + taskInputAdd:false, + //选择字段弹窗 + taskInputFieldAdd:false, taskReq:{ }, + taskAddReq:{}, + taskInputReq:{}, taskList:[], + tableList:[], }; }, //计算属性 类似于data概念", @@ -198,6 +336,31 @@ export default { watch: {}, //方法集合", methods: { + executeTask(){ + this.taskInputAdd = true; + }, + + addTaskInput(){ + this.taskInputAdd = false; + this.taskInputFieldAdd = true; + }, + + //添加页面展示 + handleAdd(){ + this.dialogFormVisible = true; + }, + + //添加任务 + addTask(){ + addTask(this.taskAddReq).then(res=>{ + alert(res.msg) + if(res.code == 200){ + location.reload(); + } + }); + }, + + //根据条件查询列表 findSelectTaskList(){ selectTaskList(this.taskReq).then(res=>{ console.log(res.data); @@ -206,10 +369,19 @@ export default { }) }, - insertAdd(){ + updateById(){ }, + handleDelete(row){ + deleteByTaskId(row.getId).then(res=>{ + alert(res.msg); + if(res.code == 200){ + location.reload(); + } + }) + }, + handleSelectionChange(row){ }, diff --git a/vue.config.js b/vue.config.js index 5fa6595..d93d965 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,6 +38,7 @@ module.exports = { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: `http://172.13.1.1/prod-api`, + // target: `http://127.0.0.1/8080`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''