企业管理完善新增
parent
5f117474af
commit
b521eb0c12
|
@ -47,3 +47,10 @@ export function delapi(productId){
|
|||
})
|
||||
}
|
||||
|
||||
export function getprice(productId){
|
||||
return request({
|
||||
url:"/background/apimanage/getprice/"+productId,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -76,13 +76,6 @@ export function updateByordersState1(data){
|
|||
data: data
|
||||
})}
|
||||
|
||||
export function listreclaim(data){
|
||||
return request({
|
||||
url:"/market/orders/listreclaim",
|
||||
method: "POST",
|
||||
data: data
|
||||
})}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,3 +7,12 @@ export function gethostportList(){
|
|||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
export function getcompany(){
|
||||
return request({
|
||||
url:"/market/company/selectcompany",
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -148,7 +148,31 @@ export const constantRoutes = [
|
|||
path: 'index',
|
||||
name: 'apiupdmessage',
|
||||
component: () => import('@/views/background/apiupdmessage/index.vue'),
|
||||
meta: { title: '接口列表', icon: 'form' }
|
||||
meta: { title: '接口信息修改页面', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/product',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'product',
|
||||
component: () => import('@/views/market/product/index.vue'),
|
||||
meta: { title: '数据块', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/Workbench',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'Workbench',
|
||||
component: () => import('@/views/market/workbench/index.vue'),
|
||||
meta: { title: '信息', icon: 'form' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -116,10 +116,12 @@
|
|||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
|
||||
<!--新增对话框-->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
title="新增接口"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<center>
|
||||
<el-form :model="api" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
|
@ -132,9 +134,6 @@
|
|||
<el-form-item label="接口描述" prop="productContent" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productContent" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口价格" prop="productPrice" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口来源" prop="productFrom" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productFrom" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -150,6 +149,28 @@
|
|||
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.requestMethod" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择默认规格" prop="requestMethod" style="width: 70%">
|
||||
<el-select v-model="api.productSpecification" placeholder="请选择默认规格">
|
||||
<el-option label="按次查询" value="按次查询"></el-option>
|
||||
<el-option label="包日" value="包日"></el-option>
|
||||
<el-option label="包月" value="包月"></el-option>
|
||||
<el-option label="包年" value="包年"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-divider></el-divider>
|
||||
<span>价格</span>
|
||||
<el-form-item label="按次查询" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.timemoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包日" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.daymoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包月" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.monthmoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包年" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.yearmoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</center>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
@ -171,14 +192,13 @@
|
|||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {
|
||||
addproduct,
|
||||
delapi,
|
||||
productStateLis,
|
||||
productStateList,
|
||||
delapi, getprice,
|
||||
selectapiList,
|
||||
UpdproductState
|
||||
} from "@/api/background/apimanage";
|
||||
import {resetForm} from "@/utils/muyu";
|
||||
import {add} from "lodash/math";
|
||||
import api from "js-cookie";
|
||||
|
||||
export default {
|
||||
name: "Apimanage",
|
||||
|
@ -189,6 +209,13 @@ export default {
|
|||
//这里存放数据"
|
||||
return {
|
||||
tableData:[],
|
||||
moneyData:[],
|
||||
money:{
|
||||
timemoney:'',
|
||||
daymoney:'',
|
||||
monthmoney:'',
|
||||
yearmoney:''
|
||||
},
|
||||
ruleForm:{
|
||||
pageNum:1,
|
||||
pageSize:9,
|
||||
|
@ -253,7 +280,21 @@ export default {
|
|||
},
|
||||
//修改
|
||||
handleEdit(row){
|
||||
this.$router.push({path:"/apiupdmessage/index",query:{api:row}})
|
||||
//查询中间表,获取不同规格对应的价格
|
||||
getprice(row.productId).then(response=>{
|
||||
this.moneyData=response.data
|
||||
this.money.timemoney=this.moneyData[0].middlePrice
|
||||
this.money.daymoney=this.moneyData[1].middlePrice
|
||||
this.money.monthmoney=this.moneyData[2].middlePrice
|
||||
this.money.yearmoney=this.moneyData[3].middlePrice
|
||||
row.timemoney = this.money.timemoney;
|
||||
row.daymoney = this.money.daymoney;
|
||||
row.monthmoney = this.money.monthmoney;
|
||||
row.yearmoney = this.money.yearmoney;
|
||||
this.$router.push({path:"/apiupdmessage/index",query:{api:row}})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
//删除
|
||||
handleDelete(row){
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
<el-form-item label="接口销量" prop="productSales" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productSales" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口价格" prop="productPrice" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口来源" prop="productFrom" style="width: 70%">
|
||||
<el-input type="text" v-model="api.productFrom" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -38,6 +35,28 @@
|
|||
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.requestMethod" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择默认规格" prop="requestMethod" style="width: 70%">
|
||||
<el-select v-model="api.productSpecification" placeholder="请选择默认规格">
|
||||
<el-option label="按次查询" value="按次查询"></el-option>
|
||||
<el-option label="包日" value="包日"></el-option>
|
||||
<el-option label="包月" value="包月"></el-option>
|
||||
<el-option label="包年" value="包年"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-divider></el-divider>
|
||||
<span>价格</span>
|
||||
<el-form-item label="按次查询" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.timemoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包日" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.daymoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包月" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.monthmoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="包年" prop="requestMethod" style="width: 70%">
|
||||
<el-input type="text" v-model="api.yearmoney" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm(api)">修改</el-button>
|
||||
<el-button @click="resetForm('ruleForm')">重置</el-button>
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<template>
|
||||
<div>
|
||||
<span>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<span>
|
||||
<el-radio-group v-model="labelPosition" size="small">
|
||||
<el-radio-button label="left">左对齐</el-radio-button>
|
||||
<el-radio-button label="right">右对齐</el-radio-button>
|
||||
|
@ -9,7 +15,7 @@
|
|||
<div style="margin: 20px;"></div>
|
||||
<el-form :label-position="labelPosition" label-width="80px" :model="tableMsg">
|
||||
<el-form-item label="任务id">
|
||||
<el-input v-model="tableMsg.taskId" :disabled="true"></el-input>
|
||||
<el-input v-model="tableMsg.id" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据库id">
|
||||
<el-input v-model="tableMsg.databaseId" :disabled="true"></el-input>
|
||||
|
@ -18,104 +24,41 @@
|
|||
<el-cascader
|
||||
v-model="tableMsg.tableName"
|
||||
:options="tables"
|
||||
:props="{ expandTrigger: 'hover',value:'name',label:'name',children:'tableNames' }"
|
||||
:props="{ expandTrigger: 'hover',value:'id',label:'name',children:'tableNames' }"
|
||||
@change="handleChange"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="表别名">
|
||||
<el-input v-model="tableMsg.tableAsName"></el-input>
|
||||
<el-input v-model="tableMsg.tableAsField"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="nextOne()">下一步</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible1"
|
||||
width="65%"
|
||||
>
|
||||
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="ID" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="field" label="字段名称" width="120"/>
|
||||
<el-table-column prop="type" label="字段类型" width="120"/>
|
||||
<el-table-column prop="collation" label="编码格式" width="120"/>
|
||||
<el-table-column prop="nullable" label="是否为空" width="120"/>
|
||||
<el-table-column prop="primarys" label="主键" width="120"/>
|
||||
<el-table-column prop="annotation" label="注释" width="120"/>
|
||||
<el-table-column label="表别名" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.dataField }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规则" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.fieldEngineId" placeholder="无规则">
|
||||
<el-option label="无规则" value="1"></el-option>
|
||||
<el-option label="区域二" value="beijing"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSure()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {addTableField, addTaskInfo, extractDataName, selectByTableName} from "../../../api/etl/etl";
|
||||
import node from "../../../components/ef/node.vue";
|
||||
import {extractDataName} from "../../../api/etl/etl";
|
||||
|
||||
export default {
|
||||
name: "task",
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: ['nodesIds'],
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据"
|
||||
|
||||
return {
|
||||
allFields:{
|
||||
taskId: this.$route.query.id,
|
||||
nodeId: this.nodesIds,
|
||||
field:"",
|
||||
asField:"",
|
||||
isNull:"",
|
||||
comment:""
|
||||
},
|
||||
tableData:[],
|
||||
dataForm:true,
|
||||
dialogVisible1: false,
|
||||
tables:{},
|
||||
tableMsg:{
|
||||
//nodeId
|
||||
nodeId: this.nodesIds,
|
||||
//任务ID
|
||||
taskId: this.$route.query.id,
|
||||
//数据库ID
|
||||
databaseId:"",
|
||||
//表名
|
||||
tableName:"",
|
||||
//字段名
|
||||
tableField:"",
|
||||
//表别名
|
||||
tableAsName:"",
|
||||
//表别名字段
|
||||
tableAsField:"",
|
||||
//规则
|
||||
fieldEngineId:""
|
||||
},
|
||||
labelPosition: 'right',
|
||||
dialogVisible:false,
|
||||
multipleSelection: [],
|
||||
fields:[]
|
||||
tableMsg:{},
|
||||
tables:{}
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -124,66 +67,19 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
doSure(){
|
||||
this.dialogVisible1 = false
|
||||
this.$emit('taskInputForm', false);
|
||||
this.tableMsg.taskId = this.$route.query.id
|
||||
let detailData = [...new Set(this.multipleSelection)]
|
||||
this.tableMsg.tableAsField = detailData.join(',');
|
||||
|
||||
this.fields.forEach(item => {
|
||||
this.allFields.asField = item.dataField
|
||||
this.allFields.field = item.field
|
||||
this.allFields.isNull = item.nullable
|
||||
this.allFields.comment = item.annotation
|
||||
addTableField(this.allFields).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
})
|
||||
addTaskInfo(this.tableMsg).then(res =>{
|
||||
if (res.code == 200){
|
||||
this.$message.success("节点安置成功")
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.fields = val
|
||||
val.forEach(res =>{
|
||||
this.multipleSelection.push(res.dataField);
|
||||
})
|
||||
console.log(this.fields);
|
||||
},
|
||||
|
||||
nextOne(){
|
||||
let tableName = this.tableMsg.tableName.toString();
|
||||
selectByTableName(tableName).then(res => {
|
||||
this.dialogVisible1 = true
|
||||
this.tableData = res.data
|
||||
this.tableData.forEach(item => {
|
||||
this.tableMsg.tableField += ","+item.field
|
||||
})
|
||||
this.tableMsg.tableField = this.tableMsg.tableField.substring(1)
|
||||
res.data.forEach(response => {
|
||||
response.dataField = this.tableMsg.tableAsName+"_"+response.field
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
handleChange(value) {
|
||||
this.tableMsg.databaseId = value[0]
|
||||
this.tableMsg.tableName = value[1]
|
||||
console.log(value);
|
||||
},
|
||||
getDatabaseMessage(){
|
||||
this.dialogVisible = true
|
||||
extractDataName().then(res => {
|
||||
console.log(res);
|
||||
this.tables = res.data
|
||||
})
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.getDatabaseMessage()
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
|
|
|
@ -80,9 +80,13 @@
|
|||
|
||||
<el-table-column label="操作" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑节点</el-button>
|
||||
<el-button size="mini" @click="todoTask(scope.$index, scope.row)">执行任务</el-button>
|
||||
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.$index, scope.row)">编辑节点</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -117,7 +121,7 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import {addTask, delTask, showTask, todoTask} from "../../../api/etl/etl";
|
||||
import {addTask, delTask, showTask} from "../../../api/etl/etl";
|
||||
|
||||
export default {
|
||||
name: "Task",
|
||||
|
@ -145,15 +149,6 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
todoTask(index,row){
|
||||
todoTask(row.id).then(res => {
|
||||
if (res.code == 200){
|
||||
this.$message.success("操作成功")
|
||||
}else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit(){
|
||||
this.getData()
|
||||
},
|
||||
|
@ -177,7 +172,8 @@ export default {
|
|||
})
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
this.$router.push({path:"/etl/active",query:{"id":row.id}})
|
||||
let url = `http://21.12.0.10/easyFlow`
|
||||
window.open(url,"_blank")
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
console.log(index, row);
|
||||
|
|
|
@ -15,152 +15,90 @@
|
|||
<div id="container" />
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
|
||||
<task v-if="taskOpen" @taskInputForm="findFormValue" :nodes-ids="nodesIds"/>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="提示" :visible.sync="dialogVisible1" width="30%">
|
||||
<el-table :data="nodeList" style="width: 100%">
|
||||
<el-table-column prop="databaseId" label="数据库" width="180"></el-table-column>
|
||||
<el-table-column prop="tableAsName" label="表别名" width="180"></el-table-column>
|
||||
</el-table>
|
||||
<div style="margin: 20px;"></div>
|
||||
<el-form label-width="80px" :model="joinCheck">
|
||||
<el-form-item label="联查方式">
|
||||
<el-select v-model="joinCheck.joinId" 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-select v-model="joinCheck.firstCloumn" placeholder="请选择关联字段">
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.nodeMsg"
|
||||
:label="item.nodeMsg"
|
||||
:value="item.nodeMsg">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="joinCheck.secondCloumn" placeholder="请选择关联字段">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.nodeMsg"
|
||||
:label="item.nodeMsg"
|
||||
:value="item.nodeMsg">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<span>
|
||||
<el-radio-group v-model="labelPosition" size="small">
|
||||
<el-radio-button label="left">左对齐</el-radio-button>
|
||||
<el-radio-button label="right">右对齐</el-radio-button>
|
||||
<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="tableMsg">
|
||||
<el-form-item label="任务id">
|
||||
<el-input v-model="tableMsg.id" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据库id">
|
||||
<el-input v-model="tableMsg.databaseId" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据表">
|
||||
<el-cascader
|
||||
v-model="tableMsg.tableName"
|
||||
:options="tables"
|
||||
:props="{ expandTrigger: 'hover',value:'name',label:'name',children:'tableNames' }"
|
||||
@change="handleChange"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="表别名">
|
||||
<el-input v-model="tableMsg.tableAsField"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="todoSelect">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="nextOne()">下一步</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible2"
|
||||
width="40%"
|
||||
:visible.sync="dialogVisible1"
|
||||
width="30%"
|
||||
>
|
||||
<el-table ref="multipleTable" :data="fields" tooltip-effect="dark" style="width: 100%"
|
||||
@selection-change="SelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column label="字段" width="120"><template slot-scope="scope">{{ scope.row.field }}</template></el-table-column>
|
||||
<el-table-column label="别名" width="120"><template slot-scope="scope">{{ scope.row.asField }}</template></el-table-column>
|
||||
<el-table-column label="非空" width="120"><template slot-scope="scope">{{ scope.row.isNull }}</template></el-table-column>
|
||||
<el-table-column label="注释" width="120"><template slot-scope="scope">{{ scope.row.comment }}</template></el-table-column>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="日期"
|
||||
width="120">
|
||||
<template slot-scope="scope">{{ scope.row.date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<el-cascader
|
||||
v-model="toTable"
|
||||
:options="tt"
|
||||
:props="{ expandTrigger: 'hover',value:'name',label:'name',children:'tableNames' }"
|
||||
@change="handleChange"></el-cascader>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible2 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="showTableFields">确 定</el-button>
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="提示" :visible.sync="finalVisible" width="30%">
|
||||
<el-table ref="multipleTable" :data="sqlList" tooltip-effect="dark" style="width: 100%"
|
||||
@selection-change="SelectionChange">
|
||||
<el-table-column label="输入字段" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.asField }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="输出字段" width="120">
|
||||
<el-select v-model="cloumns" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.field"
|
||||
:value="item.field">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="finalVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addSql">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Graph } from "@antv/x6";
|
||||
import {
|
||||
addOutPut,
|
||||
addSelect,
|
||||
extractDataName, findBySelectId,
|
||||
seeTableField, selectByAsField,
|
||||
selectByNodeId,
|
||||
selectByOne, selectByTableName,
|
||||
} from "../../../api/etl/etl";
|
||||
import task from "/src/views/components/task/index.vue"
|
||||
import {extractDataName, selectByTableName} from "../../../api/etl/etl";
|
||||
|
||||
export default {
|
||||
name: "antvX6",
|
||||
components:{
|
||||
task
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sourceField:[],
|
||||
outPuter:{
|
||||
nodeId:"",
|
||||
taskId:"",
|
||||
tableFields:"",
|
||||
tableAsFields:"",
|
||||
targetDatabase:"",
|
||||
targetTableName:""
|
||||
},
|
||||
options:{},
|
||||
sqlList:[],
|
||||
toTable:"",
|
||||
tt:{},
|
||||
fields:[],
|
||||
finalVisible:false,
|
||||
dialogVisible2:false,
|
||||
options1:{},
|
||||
options2:{},
|
||||
nodeList:[],
|
||||
neighbors:[],
|
||||
nodesIds:"",
|
||||
taskOpen:false,
|
||||
joinCheck:{
|
||||
nodeId:"",
|
||||
joinId:"",
|
||||
leftNodeId:"",
|
||||
rightNodeId:"",
|
||||
firstCloumn:"",
|
||||
secondCloumn:""
|
||||
},
|
||||
asFields:[],
|
||||
tableData:[],
|
||||
dialogVisible1: false,
|
||||
tables:{},
|
||||
|
@ -168,21 +106,18 @@ export default {
|
|||
tableName:"",
|
||||
tableAsField:""
|
||||
},
|
||||
cloumns:'',
|
||||
labelPosition: 'right',
|
||||
dialogVisible:false,
|
||||
curSelectNode: "",
|
||||
tableFields:[],
|
||||
tableDataNodeId:[],
|
||||
moduleList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "开始",
|
||||
name: "表1",
|
||||
image: require("@/assets/img/1.png"),
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "表",
|
||||
name: "表2",
|
||||
image: require("@/assets/img/2.png"),
|
||||
},
|
||||
{
|
||||
|
@ -192,130 +127,37 @@ export default {
|
|||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "导出",
|
||||
name: "节点4",
|
||||
image: require("@/assets/img/4.png"),
|
||||
},
|
||||
],
|
||||
graph: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDatabaseMessage()
|
||||
},
|
||||
methods: {
|
||||
showTableFields(){
|
||||
this.finalVisible = true
|
||||
let fieldsList = [...new Set(this.tableFields)]
|
||||
selectByAsField(fieldsList).then(res => {
|
||||
this.sqlList = res.data
|
||||
})
|
||||
|
||||
selectByTableName(this.toTable).then(res => {
|
||||
this.options = res.data
|
||||
})
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
addSql(){
|
||||
this.outPuter.taskId = this.$route.query.id
|
||||
let fieldsList = [...new Set(this.tableFields)]
|
||||
let tableAsFieldList = [...new Set(this.sourceField)]
|
||||
this.outPuter.tableFields = fieldsList.toString()
|
||||
this.outPuter.tableAsFields = tableAsFieldList.toString()
|
||||
this.outPuter.targetTableName = this.toTable
|
||||
addOutPut(this.outPuter).then(res => {
|
||||
if (res.code == 200){
|
||||
this.$message.success("输出节点放置成功")
|
||||
}else {
|
||||
this.$message.error("发生异常请联系管理员")
|
||||
}
|
||||
nextOne(){
|
||||
let tableAsField = this.tableMsg.tableAsField;
|
||||
let tableName = this.tableMsg.tableName.toString();
|
||||
selectByTableName(tableName).then(res => {
|
||||
this.dialogVisible1 = true
|
||||
this.tableData = res.data
|
||||
console.log(res);
|
||||
})
|
||||
this.dialogVisible2 = false
|
||||
this.finalVisible = false
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleChange(value){
|
||||
this.outPuter.targetDatabase = value[0]
|
||||
this.toTable = value[1]
|
||||
handleChange(value) {
|
||||
|
||||
this.tableMsg.tableName = value[1]
|
||||
},
|
||||
getDatabaseMessage(){
|
||||
this.dialogVisible = true
|
||||
extractDataName().then(res => {
|
||||
this.tt = res.data
|
||||
this.tables = res.data
|
||||
})
|
||||
},
|
||||
SelectionChange(val){
|
||||
val.forEach(res => {
|
||||
this.tableFields.push(res.asField)
|
||||
this.sourceField.push(res.field)
|
||||
})
|
||||
},
|
||||
todoSelect(){
|
||||
addSelect(this.joinCheck).then(res => {
|
||||
if (res.code == 200){
|
||||
this.$message.success("操作成功")
|
||||
}else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
findFormValue(){
|
||||
this.dialogVisible = false
|
||||
this.taskOpen = false
|
||||
},
|
||||
openForm(data){
|
||||
let textWrap = data.attrs.label.textWrap;
|
||||
if (textWrap.text == "表"){
|
||||
console.log("表节点ID=>"+data.id);
|
||||
this.tableDataNodeId.push(data.id)
|
||||
this.dialogVisible = true;
|
||||
this.taskOpen=true;
|
||||
}
|
||||
if (textWrap.text == "联查"){
|
||||
this.dialogVisible1 = true;
|
||||
this.joinCheck.nodeId = data.id
|
||||
console.log("联查节点ID=>"+data.id);
|
||||
const edges = this.graph.getEdges().filter(edge => {
|
||||
return edge.getSourceNode().id === data.id || edge.getTargetNode().id === data.id;
|
||||
});
|
||||
|
||||
const neighbors = [];
|
||||
edges.forEach(edge => {
|
||||
const otherNodeId = edge.getSourceNode().id === data.id ? edge.getTargetNode().id : edge.getSourceNode().id;
|
||||
if (!neighbors.includes(otherNodeId)) {
|
||||
neighbors.push(otherNodeId);
|
||||
}
|
||||
});
|
||||
this.neighbors = neighbors;
|
||||
this.joinCheck.leftNodeId = neighbors[0]
|
||||
this.joinCheck.rightNodeId = neighbors[1]
|
||||
selectByOne(neighbors[0]).then(res =>{
|
||||
this.options1 = res.data
|
||||
})
|
||||
selectByOne(neighbors[1]).then(res =>{
|
||||
this.options2 = res.data
|
||||
})
|
||||
selectByNodeId(JSON.stringify(this.neighbors)).then(res => {
|
||||
this.nodeList = res.data
|
||||
})
|
||||
}
|
||||
|
||||
if (textWrap.text == "导出"){
|
||||
this.outPuter.nodeId = data.id
|
||||
console.log("导出节点ID=>"+data.id);
|
||||
this.dialogVisible2 = true
|
||||
findBySelectId(this.neighbors[0]).then(res => {
|
||||
if (res.data == null){
|
||||
seeTableField(this.tableDataNodeId).then(res => {
|
||||
this.fields = res.data
|
||||
})
|
||||
}else{
|
||||
seeTableField(this.neighbors).then(res => {
|
||||
this.fields = res.data
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//todo 鼠标划过节点在显示连接桩
|
||||
nodeAddEvent() {
|
||||
const { graph } = this;
|
||||
|
@ -332,10 +174,8 @@ export default {
|
|||
this.graph.on("node:mouseleave", () => {
|
||||
changePortsVisible(false);
|
||||
});
|
||||
this.graph.on("node:dblclick",(evt) =>{
|
||||
let data = evt.node.store.data;
|
||||
this.nodesIds = data.id;
|
||||
this.openForm(data)
|
||||
this.graph.on("node:dblclick",() =>{
|
||||
this.getDatabaseMessage()
|
||||
})
|
||||
//todo 节点绑定点击事件
|
||||
this.graph.on("node:click", ({ e, x, y, node, view }) => {
|
||||
|
@ -439,7 +279,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// todo 拖动后松开鼠标触发事件
|
||||
// 拖动后松开鼠标触发事件
|
||||
handleDragEnd(e, item) {
|
||||
// 可以获取到最后拖动后松开鼠标时的坐标和拖动的节点相关信息
|
||||
this.addHandleNode(
|
||||
|
|
|
@ -285,7 +285,7 @@
|
|||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click=" confirmSelection">确 定</el-button>
|
||||
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
@ -549,7 +549,14 @@ export default {
|
|||
});
|
||||
}},
|
||||
confirmSelection(row) {
|
||||
this.dialogVisible1=false
|
||||
if (this.selectedRow) {
|
||||
// 这里假设你有一个发起支付的方法,传入所选行的数据
|
||||
startPayment(this.selectedRow);
|
||||
console.log(row)
|
||||
window.open("http://localhost:9701 " +
|
||||
"/alipay/pay?middlePrice="+row.middlePrice)
|
||||
this.$message.success('付款成功')
|
||||
|
||||
// 创建一个容器来展示数据
|
||||
var container = document.getElementById('news-list');
|
||||
|
@ -575,22 +582,14 @@ export default {
|
|||
resultDiv.innerHTML += '<p>Result: ' + jsonData.result.res + '</p>';
|
||||
} else {
|
||||
resultDiv.innerHTML += '<p>Result information is not available.</p>';
|
||||
// 这里假设你有一个发起支付的方法,传入所选行的数据
|
||||
// startPayment(this.selectedRow);
|
||||
console.log(row)
|
||||
window.open("http://localhost:9701/alipay/pay?middlePrice="+row.middlePrice)
|
||||
this.$message.success('付款成功')
|
||||
|
||||
}
|
||||
|
||||
// 将结果div添加到容器中
|
||||
container.appendChild(resultDiv);
|
||||
|
||||
}
|
||||
//测试次数-1
|
||||
reducetestcount(this.myapi).then(response=>{})
|
||||
}
|
||||
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
|
|
|
@ -8,19 +8,18 @@
|
|||
<el-row>
|
||||
<el-col :span="20"><div class="grid-content bg-purple">
|
||||
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-select v-model="ruleForm.productState" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-select v-model="ruleForm.productState" placeholder="请选择状态">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in options"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-input type="text" v-model="ruleForm.productName" style="width: 200px" autocomplete="off" placeholder="名称搜索"></el-input>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
||||
</el-form>
|
||||
</div></el-col>
|
||||
<el-col :span="4"><div class="grid-content bg-purple-light"><el-button type="primary">新增数据</el-button></div></el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="12">
|
||||
|
@ -39,7 +38,7 @@
|
|||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="6"><div class="grid-content bg-purple">
|
||||
<el-button type="info" @click="test(myapi)">测试</el-button>
|
||||
<el-button type="success" @click="test(myapi)">使用</el-button>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
|
|
@ -30,14 +30,11 @@
|
|||
</div>
|
||||
</el-card>
|
||||
|
||||
<br>
|
||||
<button style="float: right; padding: 3px 10px" type="text" @click="reclaim">回收站</button>
|
||||
<br>
|
||||
<br>
|
||||
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>数据列表</span>
|
||||
<button @click="add(1)" style="float: right; padding: 3px 10px" type="text">添加</button>
|
||||
<button style="float: right; padding: 3px 10px" type="text" @click="getOut">导出</button>
|
||||
</div>
|
||||
|
||||
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
|
@ -47,72 +44,72 @@
|
|||
<span style="margin-left: 10px">{{ scope.row.ordersLaunchdate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买信息">
|
||||
<el-table-column label="订单编号" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单所属人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="购买详情">
|
||||
<el-table-column prop="province" label="购买接口" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单金额" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单规格" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="ordersUpdate(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="updateByeExist(scope.row)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="pay(scope.row)" >支付</el-button>
|
||||
<!-- v-if="scope.row.status === '待支付'"-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买信息">
|
||||
<el-table-column label="订单编号" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单所属人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="购买详情">
|
||||
<el-table-column prop="province" label="购买接口" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单金额" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单规格" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="ordersUpdate(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="ordersDelete(scope.row)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="pay(scope.row)" >支付</el-button>
|
||||
<!-- v-if="scope.row.status === '待支付'"-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="float: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="orders.pageNum"
|
||||
:page-sizes="[5, 10, 50, 100]"
|
||||
:page-size="orders.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="orders.total">
|
||||
</el-pagination>
|
||||
<el-pagination style="float: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="orders.pageNum"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:page-size="orders.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="orders.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
|
@ -148,22 +145,13 @@
|
|||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {
|
||||
selectList,
|
||||
updateOrders,
|
||||
addordersup,
|
||||
ordersDelete,
|
||||
pay,
|
||||
getOut,
|
||||
updateByeExist
|
||||
} from '@/api/market/orders'
|
||||
import { selectList, updateOrders, addordersup, ordersDelete ,pay} from '@/api/market/orders'
|
||||
import { diGui } from "@/api/market/orders";
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
|
@ -237,24 +225,13 @@ export default {
|
|||
)
|
||||
},
|
||||
// 删除
|
||||
|
||||
updateByeExist(row){
|
||||
const result = window.confirm(`你确定要执行此操作吗?`);
|
||||
if (result) {
|
||||
updateByeExist(row.ordersId).then(
|
||||
res => {
|
||||
this.$message.success(res.msg)
|
||||
this.selectList()
|
||||
}
|
||||
)
|
||||
location.reload();
|
||||
// 用户点击确定后的逻辑处理,这里可以使用传入的 id
|
||||
console.log(`用户点击了确定,ID 为 ${row.ordersId}`);
|
||||
} else {
|
||||
// 用户点击取消后的逻辑处理
|
||||
console.log('用户点击了取消');
|
||||
}
|
||||
|
||||
ordersDelete(row){
|
||||
ordersDelete(row.ordersId).then(
|
||||
res => {
|
||||
this.$message.success(res.msg)
|
||||
this.selectList()
|
||||
}
|
||||
)
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
|
@ -307,37 +284,12 @@ export default {
|
|||
},
|
||||
|
||||
pay(row){
|
||||
console.log(row)
|
||||
window.open("http://localhost:9701/alipay/pay?productName="+row.productName +"&ordersNum="+row.ordersNum+"&ordersPrice="+row.ordersPrice)
|
||||
window.open("http://localhost:9701/alipay/pay?subject=" + row.name
|
||||
+ "& traceNo=" + row.no + "& totalAmount=" + row.ordersPrice)
|
||||
this.$message.success('付款成功')
|
||||
this.load();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
getOut(){
|
||||
this.download('system/operlog/export', {
|
||||
...this.queryParams
|
||||
}, `operlog_${new Date().getTime()}.xlsx`)
|
||||
|
||||
},
|
||||
|
||||
reclaim(){
|
||||
this.$router.push({path:"/reclaim/index"})
|
||||
}
|
||||
|
||||
// getOut(){
|
||||
// axios.get('/market/orders/getOutAll').
|
||||
// then(response =>{
|
||||
// if(response.data && response.data instanceof ArrayBuffer)
|
||||
// {
|
||||
// const blob = new Blob([response.data],{type:'application/octet-stream'});
|
||||
// saveAs(blob ,'订单信息表');
|
||||
// }else{
|
||||
// console.error("导出失败:" ,error);
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
|
|
|
@ -11,94 +11,94 @@
|
|||
|
||||
|
||||
|
||||
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
|
||||
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="编号" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.picImg" alt="图片损坏">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" width="400" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.shopName }}</span>
|
||||
<br>
|
||||
品牌:<span style="margin-left: 10px">{{ scope.row.brandName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货号" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">货号:{{ scope.row.shopNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标签" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
上架:
|
||||
<el-switch
|
||||
v-model="scope.row.publishStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
新品:
|
||||
<el-switch
|
||||
v-model="scope.row.newStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
推荐:
|
||||
<el-switch
|
||||
v-model="scope.row.recommandStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sort }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销量" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sale }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==0">未审核</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==1">审核通知</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
|
||||
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="编号" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.picImg" alt="图片损坏">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" width="400" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.shopName }}</span>
|
||||
<br>
|
||||
品牌:<span style="margin-left: 10px">{{ scope.row.brandName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货号" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">货号:{{ scope.row.shopNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标签" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
上架:
|
||||
<el-switch
|
||||
v-model="scope.row.publishStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
新品:
|
||||
<el-switch
|
||||
v-model="scope.row.newStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
推荐:
|
||||
<el-switch
|
||||
v-model="scope.row.recommandStatus"
|
||||
@change="updateShop(scope.row)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#C0CCDA"
|
||||
:active-value="1"
|
||||
:inactive-value="0">
|
||||
</el-switch>
|
||||
<br>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sort }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销量" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.sale }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==0">未审核</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==1">审核通知</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -73,14 +73,13 @@
|
|||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
|
||||
|
||||
import {selectList, selectTypeList} from "@/api/market/product";
|
||||
import {ifbuy, selectList, selectTypeList} from "@/api/market/product";
|
||||
|
||||
export default {
|
||||
name: 'Product',
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
|
||||
data() {
|
||||
//这里存放数据"
|
||||
return {
|
||||
|
@ -132,6 +131,12 @@ export default {
|
|||
},
|
||||
//接口测试页面
|
||||
test(product){
|
||||
//判断是否已购买
|
||||
ifbuy(product).then(response=>{
|
||||
if (response.code!=200) {
|
||||
alert(response.msg)
|
||||
}
|
||||
})
|
||||
this.$router.push({path:"/apitest/index",query:{myapi:JSON.stringify(product)}})
|
||||
},
|
||||
// test(product) {
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<div class="text item">
|
||||
<el-form ref="form" :model="orders" label-width="100px">
|
||||
<el-form-item>
|
||||
订单编号:<el-input v-model="orders.ordersNum" placeholder="编号" style="width: 130px;margin-right: 50px"></el-input>
|
||||
|
||||
订单编号:<el-input v-model="orders.ordersNum" placeholder="编号" style="width: 180px;margin-right: 50px"></el-input>
|
||||
订单款项状态:
|
||||
<el-select v-model="orders.ordersState" placeholder="请选择状态" style="margin-right: 30px" clearable>
|
||||
<el-option v-for="item in options"
|
||||
|
@ -18,21 +19,24 @@
|
|||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<br/> <br/>
|
||||
选择时间:
|
||||
<el-date-picker v-model="orders.startDate" type="date" placeholder="开始时间" style="width: 130px;"/>
|
||||
<el-date-picker v-model="orders.startDate" type="date" placeholder="开始时间" />
|
||||
-----
|
||||
<el-date-picker v-model="orders.endDate" type="date" placeholder="结束时间" style="width: 130px;"/>
|
||||
<el-date-picker v-model="orders.endDate" type="date" placeholder="结束时间"/>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
<br>
|
||||
<button style="float: right; padding: 3px 10px" type="text" @click="orderslist">返回订单列表</button>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>回收站列表</span>
|
||||
<button @click="add(1)" style="float: right; padding: 3px 10px" type="text">添加</button>
|
||||
</div>
|
||||
|
||||
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="日期" width="150" align="center">
|
||||
|
@ -40,81 +44,120 @@
|
|||
<span style="margin-left: 10px">{{ scope.row.ordersLaunchdate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买信息">
|
||||
<el-table-column label="订单编号" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单所属人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="购买详情">
|
||||
<el-table-column prop="province" label="购买接口" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单金额" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单规格" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="130" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.row)">恢复</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="ordersDelete(scope.row)">彻底删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买信息">
|
||||
<el-table-column label="订单编号" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px"> {{ scope.row.ordersNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单所属人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="购买详情">
|
||||
<el-table-column prop="province" label="购买接口" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单金额" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单规格" width="300" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单款项状态" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==0">待支付</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==1">已付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==2">未付款</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">售后(申请退款)</span>
|
||||
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">已退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="ordersDelete(scope.row)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="pay(scope.row)" >支付</el-button>
|
||||
<!-- v-if="scope.row.status === '待支付'"-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="float: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="orders.pageNum"
|
||||
:page-sizes="[5, 10, 50, 100]"
|
||||
:page-size="orders.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="orders.total">
|
||||
</el-pagination>
|
||||
<el-pagination style="float: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="orders.pageNum"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:page-size="orders.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="orders.total">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="addtitle"
|
||||
:visible.sync="addordersoff"
|
||||
width="50%"
|
||||
:before-close="handleClose">
|
||||
<div v-if="this.index==1">
|
||||
<h2>管理员慎重填写</h2><br>
|
||||
<el-form :model="ordersForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="订单编号:" prop="ordersNum">
|
||||
<el-input type="text" v-model="ordersForm.ordersNum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单产品:" prop="ordersProduct">
|
||||
<el-input type="text" v-model="ordersForm.ordersProduct" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单所属人:" prop="ordersUser">
|
||||
<el-input type="text" v-model="ordersForm.ordersUser" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额:" prop="ordersPrice">
|
||||
<el-input type="text" v-model="ordersForm.ordersPrice" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单规格:" prop="ordersSpecification">
|
||||
<el-input type="text" v-model="ordersForm.ordersSpecification" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<center>
|
||||
<el-button @click="addordersoff = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addorders(ordersForm)">提交</el-button>
|
||||
</center>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { ordersDelete, listreclaim, updateByExist} from '@/api/market/orders'
|
||||
import { selectList, update, addordersup, ordersDelete ,pay} from '@/api/market/orders'
|
||||
import { diGui } from "@/api/market/orders";
|
||||
|
||||
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
export default {
|
||||
dicts:['product_name','orders_num','orders_state','orders_launchdate'],
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
|
@ -129,9 +172,15 @@ export default {
|
|||
},
|
||||
arr:[],
|
||||
type:[],
|
||||
|
||||
Cascader:{ expandTrigger:'hover',value:'id',label:'typeName',children:'parentPOS' },
|
||||
typeId:[],
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
|
||||
index:'',
|
||||
addtitle:'',
|
||||
addordersoff:false,
|
||||
ordersForm:{},
|
||||
|
||||
options: [{
|
||||
|
@ -161,83 +210,110 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
// 删除
|
||||
ordersDelete(row){
|
||||
ordersDelete(row.ordersId).then(
|
||||
res => {
|
||||
this.$message.success(res.msg)
|
||||
this.selectList()
|
||||
}
|
||||
)
|
||||
},
|
||||
// 重置
|
||||
chong(){
|
||||
this.orders={}
|
||||
this.selectList()
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.orders.pageSize=val
|
||||
this.selectList()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.orders.pageNum=val
|
||||
this.selectList()
|
||||
},
|
||||
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
|
||||
|
||||
pay(row){
|
||||
window.open("http://localhost:9701/alipay/pay?subject=" + row.name
|
||||
+ "& traceNo=" + row.no + "& totalAmount=" + row.ordersPrice)
|
||||
this.$message.success('付款成功')
|
||||
this.load();
|
||||
|
||||
}
|
||||
,
|
||||
// 上架,新品,推荐修改
|
||||
updateShop(orders){
|
||||
update(orders).then(
|
||||
res => {
|
||||
this.$message.success(res.msg)
|
||||
this.selectList()
|
||||
}
|
||||
)
|
||||
},
|
||||
// 修改跳转路径
|
||||
handleEdit(orders){
|
||||
if (this.orders.serviceIds && typeof this.orders.serviceIds === 'string') {
|
||||
orders.serviceid = this.orders.serviceIds.split(',');
|
||||
// ... 后续操作
|
||||
}
|
||||
console.log(JSON.stringify(orders))
|
||||
orders.serviceid=orders.serviceIds.split(',').map(id => parseInt(id, 10));
|
||||
console.log(JSON.stringify(orders))
|
||||
this.$router.push({path:'/product/info/update',query:{orders:orders}})
|
||||
},
|
||||
|
||||
addorders(ordersForm){
|
||||
addordersup(ordersForm).then(response=>{
|
||||
alert(response.msg)
|
||||
if (response.code==200){}
|
||||
this.addordersoff=false
|
||||
})
|
||||
location.reload();
|
||||
},
|
||||
// 查询
|
||||
findShop(){
|
||||
this.selectList()
|
||||
},
|
||||
// 添加跳转路径
|
||||
add(index){
|
||||
this.index=index
|
||||
if (this.index === 1) {
|
||||
this.addtitle= '添加订单';
|
||||
}
|
||||
// else if (this.index === 2) {
|
||||
// this.dialogtitle= '';
|
||||
// }
|
||||
this.addordersoff=true
|
||||
},
|
||||
// 多选框
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
//商品列表
|
||||
listreclaim() {
|
||||
listreclaim(this.orders).then(
|
||||
selectList() {
|
||||
selectList(this.orders).then(
|
||||
res => {
|
||||
console.log(res)
|
||||
this.arr = res.data.list
|
||||
this.orders.total = res.data.total
|
||||
}
|
||||
)
|
||||
},
|
||||
//复原
|
||||
handleEdit(row){
|
||||
const result = window.confirm(`你确定要执行此操作吗?`);
|
||||
if (result) {
|
||||
updateByExist(row.ordersId).then(
|
||||
res =>{
|
||||
this.$message.success(res.msg)
|
||||
this.listreclaim()
|
||||
}
|
||||
)
|
||||
location.reload();
|
||||
// 用户点击确定后的逻辑处理,这里可以使用传入的 id
|
||||
console.log(`用户点击了确定,ID 为 ${id}`);
|
||||
} else {
|
||||
// 用户点击取消后的逻辑处理
|
||||
console.log('用户点击了取消');
|
||||
}
|
||||
|
||||
},
|
||||
// 删除
|
||||
ordersDelete(row){
|
||||
const result = window.confirm(`你确定要执行此操作吗?`);
|
||||
if (result) {
|
||||
ordersDelete(row.ordersId).then(
|
||||
res => {
|
||||
this.$message.success(res.msg)
|
||||
this.listreclaim()
|
||||
}
|
||||
)
|
||||
location.reload();
|
||||
// 用户点击确定后的逻辑处理,这里可以使用传入的 id
|
||||
console.log(`用户点击了确定,ID 为 ${id}`);
|
||||
} else {
|
||||
// 用户点击取消后的逻辑处理
|
||||
console.log('用户点击了取消');
|
||||
}
|
||||
},
|
||||
// 重置
|
||||
chong(){
|
||||
this.orders={}
|
||||
this.listreclaim()
|
||||
},
|
||||
// 多选框
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.orders.pageSize=val
|
||||
this.listreclaim()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.orders.pageNum=val
|
||||
this.listreclaim()
|
||||
},
|
||||
orderslist(){
|
||||
this.$router.push({path:"/market/orders"})
|
||||
},
|
||||
// 查询
|
||||
findShop(){
|
||||
this.listreclaim()
|
||||
}
|
||||
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.listreclaim()
|
||||
// this.diGui()
|
||||
this.selectList()
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
|
|
|
@ -1,43 +1,44 @@
|
|||
<template>
|
||||
<div>
|
||||
{{orders}}
|
||||
<br><br><br>
|
||||
<center>
|
||||
<el-form :model="orders" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="订单编号" prop="ordersNum" style="width: 70% " >
|
||||
{{orders.ordersNum}}
|
||||
</el-form-item>
|
||||
<el-form-item label="订单产品" prop="productName" style="width: 70%">
|
||||
<el-select v-model="orders.productName" placeholder="请选择产品">
|
||||
<el-option v-model="orders.productName" :value="orders.productId"></el-option>
|
||||
<el-option v-for="item in product" :label="item.productName" :key="item.productId" :value="item.productId" ></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单所属人" prop="userName" style="width: 70%">
|
||||
{{orders.userName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额" prop="ordersPrice" style="width: 70%">
|
||||
<el-input type="text" v-model="orders.ordersPrice" autocomplete="off" style="width: 100px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单规格" prop="ordersSpecification" style="width: 70%">
|
||||
<el-input type="text" v-model="orders.ordersSpecification" autocomplete="off" style="width: 250px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单款项状态" prop="ordersState" style="width: 70%">
|
||||
|
||||
<el-select v-model="orders.ordersState" placeholder="订单款项状态" >
|
||||
<el-option label="待支付-0" value="0"></el-option>
|
||||
<el-option label="已支付-1" value="1"></el-option>
|
||||
<el-option label="未支付-2" value="2"></el-option>
|
||||
<el-option label="售后(审核退款)-3" value="3"></el-option>
|
||||
<el-option label="退款成功-4" value="4"></el-option>
|
||||
</el-select>
|
||||
<center>
|
||||
<el-form :model="api" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="productId" style="width: 70%">
|
||||
{{orders.productId}}
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期" prop="ordersLaunchdate" style="width: 70%">
|
||||
{{orders.ordersLaunchdate}}
|
||||
<el-form-item label="接口名称" prop="productName" style="width: 70%">
|
||||
{{orders.productName}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口类型" prop="productType" style="width: 70%">
|
||||
{{orders.productType}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口描述" prop="productContent" style="width: 70%">
|
||||
{{orders.productContent}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口销量" prop="productSales" style="width: 70%">
|
||||
{{orders.productSales}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口价格" prop="productPrice" style="width: 70%">
|
||||
{{orders.productPrice}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口来源" prop="productFrom" style="width: 70%">
|
||||
{{orders.productFrom}}
|
||||
</el-form-item>
|
||||
<el-form-item label="重要路由" prop="apiRouter" style="width: 70%">
|
||||
{{orders.apiRouter}}
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址" prop="apiAddress" style="width: 70%">
|
||||
{{orders.apiAddress}}
|
||||
</el-form-item>
|
||||
<el-form-item label="返回格式" prop="returnFormat" style="width: 70%">
|
||||
{{orders.returnFormat}}
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方式" prop="requestMethod" style="width: 70%">
|
||||
{{orders.requestMethod}}
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">返回</el-button>
|
||||
<el-button type="primary" @click="update(row)">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</center>
|
||||
|
@ -47,18 +48,15 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import { updateOrders } from '@/api/market/orders'
|
||||
|
||||
export default {
|
||||
|
||||
name: "Apidetailmessage",
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据"
|
||||
return {
|
||||
orders:{},
|
||||
product:[]
|
||||
orders:{}
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -68,15 +66,7 @@ export default {
|
|||
//方法集合",
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.$router.push("/market/orders")
|
||||
},
|
||||
|
||||
update(row){
|
||||
updateOrders(this.orders).then(
|
||||
res =>{
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
)
|
||||
this.$router.push("/apimanage/index")
|
||||
}
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -84,7 +74,7 @@ export default {
|
|||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
this.orders = this.$route.query.orders
|
||||
this.api = this.$route.query.api
|
||||
},
|
||||
beforeCreate() {
|
||||
}, //生命周期 - 创建之前",
|
||||
|
|
|
@ -190,10 +190,10 @@ export default {
|
|||
insertmoney(moneyForm){
|
||||
if (moneyForm.pay==1){
|
||||
if (moneyForm.resource!=''){
|
||||
window.open("http://21.12.0.10:80/alipay/pay?ordersPrice="+moneyForm.resource)
|
||||
window.open("http://localhost:9701/alipay/pay?ordersPrice="+moneyForm.resource)
|
||||
this.$message.success('付款成功')
|
||||
}else {
|
||||
window.open("http://21.12.0.10:80/alipay/pay?ordersPrice="+moneyForm.resource)
|
||||
window.open("http://localhost:9701/alipay/pay?ordersPrice="+moneyForm.resource)
|
||||
this.$message.success('付款成功')
|
||||
}
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@
|
|||
</template>
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- v-if="dataType === 'dataTable'-->
|
||||
<!-- v-if="dataType === 'dataTable'-->
|
||||
<el-card class="box-card" style="margin-top: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>模型数据</span>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<el-col :span="6" v-for="DataValue in tableStructure" style="margin-top: 20px">
|
||||
<el-descriptions :title="测试+'.'+tableBasic.name+'.'+DataValue.field" direction="vertical"
|
||||
border :column="1">
|
||||
|
@ -99,7 +99,6 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import { findTableValue, getExtractDataTableNameList, selectBasicList } from '@/api/property/asDisplay'
|
||||
import { tableStructureShow } from '@/api/property/astr'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -142,15 +141,11 @@ export default {
|
|||
},
|
||||
|
||||
handleNodeClick(data){
|
||||
if (this.data.name!=data.name){
|
||||
tableStructureShow(data).then(res=> {
|
||||
this.tableBasic = data
|
||||
console.log(res)
|
||||
this.dataNum = res.data.length
|
||||
this.tableStructure = res.data
|
||||
})
|
||||
}
|
||||
|
||||
this.tableBasic=data
|
||||
console.log(this.tableBasic)
|
||||
this.dataNum=data.tableFie.length
|
||||
this.tableStructure=data.tableFie
|
||||
console.log(this.tableStructure)
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -180,4 +175,5 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
@ -189,14 +189,12 @@ export default {
|
|||
parseTime,
|
||||
//部门switch状态变化
|
||||
handleDeptAccreditChange(deptId, value) {
|
||||
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
@ -229,13 +227,12 @@ export default {
|
|||
handleAccreditChange(userId, value) {
|
||||
console.log("userId的值::" + userId);
|
||||
console.log("value的值:" + value)
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
@ -337,16 +334,14 @@ export default {
|
|||
*/
|
||||
handleNodeClick(data) {
|
||||
this.tableBasic = data
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = this.tableBasic.deptId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = this.tableBasic.deptId
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询资产赋权用户信息
|
||||
* @param data 参数信息
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
|
||||
import { getExtractDataTableNameList, tableStructureShow } from '@/api/property/astr'
|
||||
import { getExtractDataTableNameList } from '@/api/property/astr'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -123,18 +123,14 @@ export default {
|
|||
this.data = res.data
|
||||
})
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.tableBasic = data
|
||||
|
||||
tableStructureShow(data).then(res => {
|
||||
console.log(res)
|
||||
this.dataNum = res.data.length
|
||||
this.tableStructure = res.data
|
||||
})
|
||||
handleNodeClick(data){
|
||||
this.tableBasic=data
|
||||
this.dataNum=data.tableFie.length
|
||||
this.tableStructure=data.tableFie
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
|
@ -163,4 +159,5 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue