Commit 3ba86d93 by 闫泽浩

swm静态交易更新

parent 54ce30aa
import Api from "~/service/Api"
export function queryByPage(data) {
return Api.post("/service/swm/queryByPage", data)
}
export function queryById(data) {
return Api.post(`/service/swm/queryById`,data)
}
export function add(data) {
return Api.post("/service/swm/add", data)
}
export function edit(data) {
return Api.post("/service/swm/edit", data)
}
export function deleteById(data) {
return Api.post(`/service/swm/deleteById`,data)
}
export function count(data) {
return Api.post(`/service/swm/count`,data)
}
\ No newline at end of file
...@@ -335,6 +335,16 @@ import Dbausr from "~/views/Statics/Dbausr"; ...@@ -335,6 +335,16 @@ import Dbausr from "~/views/Statics/Dbausr";
import Dbiusr from "~/views/Statics/Dbiusr"; import Dbiusr from "~/views/Statics/Dbiusr";
import Dbeusr from "~/views/Statics/Dbeusr"; import Dbeusr from "~/views/Statics/Dbeusr";
import Dbdusr from "~/views/Statics/Dbdusr"; import Dbdusr from "~/views/Statics/Dbdusr";
import Dbaswm from "~/views/Statics/Swm/views/Dbaswm";
import Dbdswm from "~/views/Statics/Swm/views/Dbdswm";
import Dbeswm from "~/views/Statics/Swm/views/Dbeswm";
import Dbiswm from "~/views/Statics/Swm/views/Dbiswm";
import Infswm from "~/views/Statics/Swm/views/Infswm";
/** /**
* 带有name的才会被添加进顶部的标签页里 * 带有name的才会被添加进顶部的标签页里
*/ */
...@@ -685,5 +695,11 @@ const BusRouter = [ ...@@ -685,5 +695,11 @@ const BusRouter = [
{ path: 'dbiusr/:inr', component: Dbiusr, name: 'StaticsDbiusr', meta: { title: (tag) => { return '柜员详情: ' + tag.params.inr } } }, { path: 'dbiusr/:inr', component: Dbiusr, name: 'StaticsDbiusr', meta: { title: (tag) => { return '柜员详情: ' + tag.params.inr } } },
{ path: 'dbeusr/:inr', component: Dbeusr, name: 'StaticsDbeusr', meta: { title: (tag) => { return '柜员修改: ' + tag.params.inr } } }, { path: 'dbeusr/:inr', component: Dbeusr, name: 'StaticsDbeusr', meta: { title: (tag) => { return '柜员修改: ' + tag.params.inr } } },
{ path: 'dbdusr/:inr', component: Dbdusr, name: 'StaticsDbdusr', meta: { title: (tag) => { return '柜员删除: ' + tag.params.inr } } }, { path: 'dbdusr/:inr', component: Dbdusr, name: 'StaticsDbdusr', meta: { title: (tag) => { return '柜员删除: ' + tag.params.inr } } },
{ path: 'infswm', component: Infswm, name: 'StaticsInfswm', meta: { title: '查询报文栏位映射信息' } },
{ path: 'dbaswm', component: Dbaswm, name: 'StaticsDbaswm', meta: { title: '新增报文栏位映射信息' } },
{ path: 'dbiswm/:inr', component: Dbiswm, name: 'StaticsDbiswm', meta: { title: (tag) => { return '查看报文栏位映射详情信息: ' + tag.params.inr } } },
{ path: 'dbeswm/:inr', component: Dbeswm, name: 'StaticsDbeswm', meta: { title: (tag) => { return '修改报文栏位映射信息: ' + tag.params.inr } } },
{ path: 'dbdswm/:inr', component: Dbdswm, name: 'StaticsDbdswm', meta: { title: (tag) => { return '删除报文栏位映射信息: ' + tag.params.inr } } },
] ]
export default BusRouter export default BusRouter
\ No newline at end of file
...@@ -26,6 +26,20 @@ import Dbaoit from "./Act/views/Dbaoit" ...@@ -26,6 +26,20 @@ import Dbaoit from "./Act/views/Dbaoit"
import Dbdoit from "./Act/views/Dbdoit" import Dbdoit from "./Act/views/Dbdoit"
import Dbeoit from "./Act/views/Dbeoit" import Dbeoit from "./Act/views/Dbeoit"
import Dbaswm from "./Swm/views/Dbaswm";
import Dbdswm from "./Swm/views/Dbdswm";
import Dbeswm from "./Swm/views/Dbeswm";
import Dbiswm from "./Swm/views/Dbiswm";
import Infswm from "./Swm/views/Infswm";
// import Infcty from "./Infcty";
// import Dbicty from "./Dbicty";
// import Dbacty from "./Dbacty";
// import Dbecty from "./Dbecty";
// import Dbdcty from "./Dbdcty";
import Inffec from "./Inffec"; import Inffec from "./Inffec";
import Dbifec from "./Dbifec"; import Dbifec from "./Dbifec";
import Dbafec from "./Dbafec"; import Dbafec from "./Dbafec";
...@@ -135,11 +149,17 @@ const StaticsRouter = [ ...@@ -135,11 +149,17 @@ const StaticsRouter = [
{ path: 'dbeatx/:inr', component: Dbeatx, name: 'StaticsDbeatx', meta: { title: (tag) => { return '保函文本修改: ' + tag.params.inr } } }, { path: 'dbeatx/:inr', component: Dbeatx, name: 'StaticsDbeatx', meta: { title: (tag) => { return '保函文本修改: ' + tag.params.inr } } },
{ path: 'dbdatx/:inr', component: Dbdatx, name: 'StaticsDbdatx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } }, { path: 'dbdatx/:inr', component: Dbdatx, name: 'StaticsDbdatx', meta: { title: (tag) => { return '保函文本删除: ' + tag.params.inr } } },
{ path: 'infswm', component: Infswm, name: 'StaticsInfswm', meta: { title: '查询报文栏位映射信息' } },
{ path: 'dbaswm', component: Dbaswm, name: 'StaticsDbaswm', meta: { title: '新增报文栏位映射信息' } },
{ path: 'dbiswm/:inr', component: Dbiswm, name: 'StaticsDbiswm', meta: { title: (tag) => { return '查看报文栏位映射详情信息: ' + tag.params.inr } } },
{ path: 'dbeswm/:inr', component: Dbeswm, name: 'StaticsDbeswm', meta: { title: (tag) => { return '修改报文栏位映射信息: ' + tag.params.inr } } },
{ path: 'dbdswm/:inr', component: Dbdswm, name: 'StaticsDbdswm', meta: { title: (tag) => { return '删除报文栏位映射信息: ' + tag.params.inr } } },
{ path: 'infoit', component: Infoit, name: 'StaticsInfoit', meta: { title: '查询消息信息' } }, { path: 'infoit', component: Infoit, name: 'StaticsInfoit', meta: { title: '查询消息信息' } },
{ path: 'dbaoit', component: Dbaoit, name: 'StaticsDbaoit', meta: { title: '新增消息信息' } }, { path: 'dbaoit', component: Dbaoit, name: 'StaticsDbaoit', meta: { title: '新增消息信息' } },
{ path: 'dbioit/:inr', component: Dbioit, name: 'StaticsDbioit', meta: { title: (tag) => { return '查看消息信息: ' + tag.params.inr } } }, { path: 'dbioit/:inr', component: Dbioit, name: 'StaticsDbioit', meta: { title: (tag) => { return '查看消息信息: ' + tag.params.inr } } },
{ path: 'dbeoit/:inr', component: Dbeoit, name: 'StaticsDbeoit', meta: { title: (tag) => { return '修改消息信息: ' + tag.params.inr } } }, { path: 'dbeoit/:inr', component: Dbeoit, name: 'StaticsDbeoit', meta: { title: (tag) => { return '修改消息信息: ' + tag.params.inr } } },
{ path: 'dbdoit/:inr', component: Dbdoit, name: 'StaticsDbdoit', meta: { title: (tag) => { return '删除消息信息: ' + tag.params.inr } } }, { path: 'dbdoit/:inr', component: Dbdoit, name: 'StaticsDbdoit', meta: { title: (tag) => { return '删除消息信息: ' + tag.params.inr } } },
] ]
export default StaticsRouter export default StaticsRouter
export default class Swm {
constructor() {
this.data = {
fmt: "",
mt: "",
frm: "",
tag: "",
subtag: "",
dst: "",
ins: "",
met: "",
cpyflg: "",
ovwflg: "",
dstgrp: "",
altmapflg: "",
num: "",
}
}
}
export const Pattern = {
"fmt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"mt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"frm": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"tag": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"subtag": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"dst": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 60, "message": "最大长度60个字符", "trigger": "blur" }
],
"ins": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"met": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"cpyflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"ovwflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"dstgrp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"swm_idx": [
],
}
<template>
<m-swm ref="swm" title="dbaswm" type="add"></m-swm>
</template>
<script>
import Dbiswm from "~/views/Statics/Swm/views/Dbiswm";
export default {
name: "StaticsDbaswm",
components: {
"m-swm": Dbiswm
},
data() {
return {};
},
// mounted() {
// this.$refs.fec.rules['fecList'] = [
// { type: 'array', required: true, min: 1, message: '地址信息栏不能为空' }
// ]
// }
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-swm title="dbdswm" type="delete"></m-swm>
</template>
<script>
import Dbiswm from "~/views/Statics/Swm/views/Dbiswm";
export default {
name: "StaticsDbdswm",
components: {
"m-swm": Dbiswm
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<m-swm title="dbeswm" type="edit"></m-swm>
</template>
<script>
import Dbiswm from "~/views/Statics/Swm/views/Dbiswm";
export default {
name: "StaticsDbeswm",
components: {
"m-swm": Dbiswm
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
export default class Swm {
constructor() {
this.data = {
fmt: "",
mt: "",
frm: "",
tag: "",
subtag: "",
dst: "",
ins: "",
met: "",
cpyflg: "",
ovwflg: "",
dstgrp: "",
altmapflg: "",
num: "",
}
}
}
export const Pattern = {
"fmt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"mt": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"frm": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"tag": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 20, "message": "最大长度20个字符", "trigger": "blur" }
],
"subtag": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"dst": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 60, "message": "最大长度60个字符", "trigger": "blur" }
],
"ins": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 8, "message": "最大长度8个字符", "trigger": "blur" }
],
"met": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 3, "message": "最大长度3个字符", "trigger": "blur" }
],
"cpyflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"ovwflg": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 1, "message": "最大长度1个字符", "trigger": "blur" }
],
"dstgrp": [
{ "required": true, "message": "必输项", "type": "string", "trigger": "blur" },
{ "max": 6, "message": "最大长度6个字符", "trigger": "blur" }
],
"swm_idx": [
],
}
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="报文格式" prop="fmt">
<c-select v-model="model.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%">
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="映射交易" prop="frm">
<c-input v-model="model.frm" placeholder="请输入映射交易"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="报文类型" prop="mt">
<c-input v-model="model.mt" placeholder="请选择报文类型" style="width:100%"></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24" style="">
<c-table
style="text-align: center"
:list="dataList"
:paginationShow="true"
:border="true"
>
<el-table-column label="报文元素" width="auto">
<template slot-scope="scope">
<c-input
v-model="scope.row.tag"
style="width: 100%"
placeholder="请输入报文元素"
>
</c-input>
</template>
</el-table-column>
<el-table-column label="报文元素id" width="auto">
<template slot-scope="scope">
<c-input v-model="scope.row.subtag"
style="width: 100%"
placeholder="请输入报文元素id"
>
</c-input>
</template>
</el-table-column>
<el-table-column label="映射模型组" prop="dstgrp" width="auto">
<template slot-scope="scope">
<c-select v-model="scope.row.dstgrp">
<el-option
v-for="item in codes.dstgrp"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</template>
</el-table-column>
<el-table-column label="映射字段" width="auto">
<template slot-scope="scope">
<c-input v-model="scope.row.dst"
style="width: 100%"
placeholder="请输入映射字段"
>
</c-input>
</template>
</el-table-column>
<el-table-column label="覆盖标识" prop="ovwflg" width="auto">
<template slot-scope="scope">
<c-select v-model="scope.row.ovwflg">
<el-option
v-for="item in codes.ovwflg"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</template>
</el-table-column>
<el-table-column label="附加映射方法" prop="met" width="auto">
<template slot-scope="scope">
<c-select v-model="scope.row.met">
<el-option
v-for="item in codes.met"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</template>
</el-table-column>
<el-table-column label="指示" width="auto">
<template slot-scope="scope">
<c-input v-model="scope.row.ins"
style="width: 100%"
placeholder="请输入指示"
>
</c-input>
</template>
</el-table-column>
<el-table-column label="" prop="det" width="auto" fixed="right">
<template slot-scope="scope" slot="header">
<c-button
circle
style="padding: 4px"
class="el-icon-plus"
size="mini"
@click="addRowSetfol(scope)"
>
</c-button>
<c-button
style="padding: 4px"
circle
class="el-icon-minus"
size="mini"
@click="removeRowSetfol(scope)"
>
</c-button>
</template>
<template slot-scope="scoped">
<c-button
style="margin-left: 0"
size="small"
type="primary"
icon="el-icon-info"
@click="detail2(scoped)"
></c-button>
</template>
</el-table-column>
</c-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
export default {
props:{
model:Object,
codes:Object,
swmFn:Function
},
data(){
return{
dataList:[],
dataModel:{
fmt:'',
mt:'',
frm:'',
tag:'',
subtag:'',
dst:'',
ins:'',
met:'',
cpyflg:'',
ovwflg:'',
dstgrp:'',
altmapflg:''
}
}
},
methods:{
getCodesByKey(key) {
return codes[key] ?? [];
},
addRowSetfol() {
let newRow = { ...this.newdialog };
this.dataModel=newRow
this.dataModel.fmt=this.model.fmt
this.dataModel.mt=this.model.mt
this.dataModel.frm=this.model.frm
this.dataList.splice(0, 0, this.dataModel);
this.swmFn(this.dataModel)
},
removeRowSetfol() {
this.dataList.shift();
},
detail2(){
},
}
}
</script>
<style >
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="报文格式" prop="fmt">
<c-select v-model="model1.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%" disabled>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="映射交易" prop="frm">
<c-input v-model="model1.frm" placeholder="请输入映射交易" :readonly="true" disabled> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="报文类型" prop="mt">
<c-input v-model="model1.mt" placeholder="请选择报文类型" style="width:100%" :readonly="true" disabled></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col>
<el-dialog :visible.sync="dialogVisible" center>
<c-col>
<el-form :model="swmRow" label-width="200px">
<c-col :span="16">
<el-form-item label="报文元素">
<c-input v-model="swmRow.tag" style="width: 100%" disabled/>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="报文元素id">
<c-input v-model="swmRow.subtag" style="width: 100%" disabled/>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="映射模型组">
<c-select v-model="swmRow.dstgrp" disabled>
<el-option
v-for="item in codes.dstgrp"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="映射字段">
<c-input v-model="swmRow.dst" style="width: 100%" disabled/>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="附加映射方法">
<c-select v-model="swmRow.met" disabled>
<el-option
v-for="item in codes.met"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="指示">
<c-input v-model="swmRow.ins" style="width: 100%" disabled/>
</el-form-item>
</c-col>
</el-form>
</c-col>
<span slot="footer" class="dialog-footer">
<c-button type="primary" @click="saveDialog">确 定</c-button>
<c-button @click="cancelDialog">取 消</c-button>
</span>
</el-dialog>
</c-col>
<c-col :span="24">
<c-paging-table
:data="swmData"
:columns="swmColumns"
:pageNumber="model1.pageNum"
:pageSize="model1.pageSize"
:total="model1.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
size="small"
style="margin-left: 5px"
@click="swmDelete(scope.$index, scope.row)"
>删除</c-button
>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryById, add, edit, deleteById } from "~/service/test/swm.js";
export default {
props:{
model1:Object,
swmModel:Array,
codes:Object,
},
data(){
return{
swmData: [],
swmColumns: [
{ label: "报文元素", prop: "tag", width: "auto"},
{ label: "报文元素id", prop: "subtag", width: "auto" },
{ label: "映射模型组", prop: "dstgrp", width: "auto" },
{ label: "映射字段", prop: "dst", width: "auto" },
{ label: "附加映射方法", prop: "met", width: "auto" },
{ label: "指示", prop: "ins", width: "auto" }
],
dialogVisible:false,
swmRow:{
},
}
},
methods:{
getCodesByKey(key) {
this.swmData=this.swmModel
return codes[key] ?? [];
},
queryFunc(pageNumber, pageSize) {
this.model1.pageNum = pageNumber;
this.model1.pageSize = pageSize;
queryById(this.model1).then((res) => {
const list = res.list;
this.swmModel=list;
console.log(list);
console.log(this.swmModel)
});
},
saveDialog(){
this.dialogVisible=false;
deleteById(this.swmRow).then((res)=>{
})
queryById(this.model1).then((res) => {
const list = res.list;
this.swmModel=list;
});
},
cancelDialog(){
this.dialogVisible=false
},
swmDelete(index,row){
this.dialogVisible=true
this.swmRow=row
this.swmRow.fmt=this.model1.fmt;
this.swmRow.mt=this.model1.mt;
this.swmRow.frm=this.model1.frm;
}
}
}
</script>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="报文格式" prop="fmt">
<c-select v-model="model1.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%" disabled>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="映射交易" prop="frm">
<c-input v-model="model1.frm" placeholder="请输入映射交易" :readonly="true" disabled> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="报文类型" prop="mt">
<c-input v-model="model1.mt" placeholder="请选择报文类型" style="width:100%" :readonly="true" disabled></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col>
<el-dialog :visible.sync="dialogVisible" center>
<c-col>
<el-form :model="swmRow" label-width="200px">
<c-col :span="16">
<el-form-item label="报文元素">
<c-input v-model="swmRow.tag" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="报文元素id">
<c-input v-model="swmRow.subtag" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="映射模型组">
<c-select v-model="swmRow.dstgrp">
<el-option
v-for="item in codes.dstgrp"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="映射字段">
<c-input v-model="swmRow.dst" style="width: 100%" />
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="附加映射方法">
<c-select v-model="swmRow.met">
<el-option
v-for="item in codes.met"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="16">
<el-form-item label="指示">
<c-input v-model="swmRow.ins" style="width: 100%" />
</el-form-item>
</c-col>
</el-form>
</c-col>
<span slot="footer" class="dialog-footer">
<c-button type="primary" @click="saveDialog">确 定</c-button>
<c-button @click="cancelDialog">取 消</c-button>
</span>
</el-dialog>
</c-col>
<c-col :span="24">
<c-paging-table
:data="swmData"
:columns="swmColumns"
:pageNumber="model1.pageNum"
:pageSize="model1.pageSize"
:total="model1.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="swmEdit(scope.$index, scope.row)"
>修改</c-button
>
<!-- <c-button
size="small"
style="margin-left: 5px"
@click="swmDelete(scope.$index, scope.row)"
>删除</c-button
> -->
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryById, add, edit, deleteById } from "~/service/test/swm.js";
export default {
props:{
model1:Object,
swmModel:Array,
codes:Object,
},
data(){
return{
swmData: [],
swmColumns: [
{ label: "报文元素", prop: "tag", width: "auto"},
{ label: "报文元素id", prop: "subtag", width: "auto" },
{ label: "映射模型组", prop: "dstgrp", width: "auto" },
{ label: "映射字段", prop: "dst", width: "auto" },
{ label: "附加映射方法", prop: "met", width: "auto" },
{ label: "指示", prop: "ins", width: "auto" }
],
dialogVisible:false,
swmRow:{
},
}
},
methods:{
getCodesByKey(key) {
this.swmData=this.swmModel
return codes[key] ?? [];
},
queryFunc(pageNumber, pageSize) {
this.model1.pageNum = pageNumber;
this.model1.pageSize = pageSize;
queryById(this.model1).then((res) => {
const list = res.list;
this.swmModel=list;
console.log(list);
console.log(this.swmModel)
});
},
saveDialog(){
this.dialogVisible=false;
add(this.swmRow).then(res=>{
})
},
cancelDialog(){
this.dialogVisible=false
add(this.swmRow).then(res=>{
})
},
swmEdit(index,row){
this.dialogVisible=true
this.swmRow=row
this.swmRow.fmt=this.model1.fmt;
this.swmRow.mt=this.model1.mt;
this.swmRow.frm=this.model1.frm;
deleteById(this.swmRow).then((res)=>{
})
}
}
}
</script>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="报文格式" prop="fmt">
<c-select v-model="model1.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%" disabled>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="映射交易" prop="frm">
<c-input v-model="model1.frm" placeholder="请输入映射交易" disabled> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="报文类型" prop="mt">
<c-select v-model="model1.mt" placeholder="请选择报文类型" :code="getCodesByKey('mt')" style="width:100%" disabled></c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="swmData"
:columns="swmColumns"
:pageNumber="model1.pageNum"
:pageSize="model1.pageSize"
:total="model1.total"
v-on:queryFunc="queryFunc"
:border="true"
>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryById, add, edit, deleteById } from "~/service/test/swm.js";
export default {
name: "",
props: {
swmModel:Array,
model1:Object
},
data() {
return {
swmData: [],
swmColumns: [
{ label: "报文元素", prop: "tag", width: "auto"},
{ label: "报文元素id", prop: "subtag", width: "auto" },
{ label: "映射模型组", prop: "dstgrp", width: "auto" },
{ label: "映射字段", prop: "dst", width: "auto" },
{ label: "附加映射方法", prop: "met", width: "auto" },
{ label: "指示", prop: "ins", width: "auto" }
],
};
},
methods:{
getCodesByKey(key) {
this.swmData=this.swmModel
return codes[key] ?? [];
},
queryFunc(pageNumber, pageSize) {
this.model1.pageNum = pageNumber;
this.model1.pageSize = pageSize;
queryById(this.model1).then((res) => {
const list = res.list;
this.swmModel=list;
console.log(list);
console.log(this.swmModel)
});
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eContainer">
<c-page :title="title">
<el-form
ref="modelForm"
label-width="120px"
size="small"
label-position="right"
:model="model"
:rules="rules"
:validate-on-rule-change="false"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="报文栏位映射信息" name="swm">
<c-content v-show="this.type=='info'">
<m-swm-info :swmModel="swmModel" :model1="model1" />
</c-content>
<c-content v-show="this.type=='add'">
<m-swm-add :model="model" :codes="codes" :swmFn="change"></m-swm-add>
</c-content>
<c-content v-show="this.type=='edit'">
<m-swm-edit :swmModel="swmModel" :model1="model1" :codes="codes"></m-swm-edit>
</c-content>
<c-content v-show="this.type=='delete'">
<m-swm-delete :swmModel="swmModel" :model1="model1" :codes="codes"></m-swm-delete>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<div style="text-align: center">
<c-button
type="primary"
style="margin-right: 10px"
@click="commitAdd"
v-if="type === 'add'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitEdit"
v-if="type === 'edit'"
>提 交</c-button
>
<c-button
type="primary"
style="margin-right: 10px"
@click="commitDelete"
v-if="type === 'delete'"
>提 交</c-button
>
<c-button type="primary" @click="goBack">返 回</c-button>
</div>
</c-page>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import Utils from "~/utils";
import Swm, { Pattern } from "./Swm.js";
import SwmInfo from "./SwmInfo.vue";
import SwmAdd from "./SwmAdd";
import SwmEdit from "./SwmEdit.vue"
import SwmDelete from "./SwmDelete.vue";
import { queryById, add, edit, deleteById,count } from "~/service/test/swm.js";
export default {
name: "StaticsDbiswm",
components: {
"m-swm-info": SwmInfo,
"m-swm-add":SwmAdd,
"m-swm-edit":SwmEdit,
"m-swm-delete":SwmDelete
},
provide() {
return {
root: this,
};
},
props: {
type: {
type: String,
default: "info"
},
title: {
type: String,
default: "dbiswm"
}
},
data() {
return {
model: new Swm().data,
tabVal: "swm",
rules: Pattern,
model1:{
frm:'',
mt:'',
fmt:'',
pageNum: 1,
pageSize: 5,
total: 0,
},
dataModels:{},
swmModel:[],
codes: {...CodeTable
},
};
},
computed: {
isDisabled() {
return this.type === "info" || this.type === "delete";
},
},
created() {
if (this.type !== "add") {
this.model1 = this.$route.params;
queryById(this.model1).then((res) => {
if (res.list.length!==0) {
this.swmModel = res.list;
this.model1.total=res.total
} else {
this.$message.error("信息不存在")
}
});
}
},
methods: {
change:function(swm){
this.dataModels=swm
},
// count(){
// count(this.model).then((res) =>{
// console.log(res)
// if(res>0){
// this.$message.error("您应该进行修改操作")
// }
// this.commitAdd()
// })
// },
commitAdd() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
console.log(this.dataModels)
add(this.dataModels)
.then((res) => {
this.$message.success("保存成功!");
this.goBack(true)
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
},
commitEdit() {
this.$message.success("保存成功!");
this.goBack(true)
},
commitDelete() {
this.$message.success("保存成功!");
this.goBack(true)
},
/**
* update 是否更新infswm的查询列表
*/
goBack(update) {
this.$store.dispatch("TagsView/delView", this.$route);
this.$router.push({ name: "StaticsInfswm", params: { update } });
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="12" class="col-left">
<c-col :span="24">
<el-form-item label="报文格式" prop="fmt">
<c-select v-model="model.fmt" placeholder="请选择报文格式" :code="fmt" style="width:100%">
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="映射交易" prop="frm">
<c-input v-model="model.frm" placeholder="请输入映射交易"> </c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12" class="col-right">
<c-col :span="24">
<el-form-item label="报文类型" prop="mt">
<c-select v-model="model.mt" placeholder="请选择报文类型" :code="mt" style="width:100%"></c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12" style="text-align: left">
<el-button type="primary" size="small" @click="swmAdd">新增</el-button>
</c-col>
<c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="onSearch()"
>查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table
:data="swmData"
:columns="swmColumns"
:pageNumber="model.pageNum"
:pageSize="model.pageSize"
:total="model.total"
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="swmInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="swmEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="swmDelete(scope.$index, scope.row)"
>删除</c-button
>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/swm.js";
export default {
name: "",
props: ["model"],
inject: ["root"],
data() {
return {
swmData: [],
swmColumns: [
{ label: "报文格式", prop: "fmt", width: "auto" },
{ label: "报文类型", prop: "mt", width: "auto" },
{ label: "映射交易", prop: "frm", width: "auto" },
{ label: "配置个数", prop: "num", width: "auto" }
],
fmt: [
{ label: "DTA Import", value: "A" },
{ label: "电证", value: "C" },
{ label: "DTA Export", value: "E" },
{ label: "单证通XML", value: "H" },
{ label: "FMT", value: "Q" },
{ label: "SWIFT", value: "S" },
{ label: "TradeConnect", value: "T" },
],
mt:[
]
};
},
computed: {
},
activated() {
const { update } = this.$route.params;
if (update) {
this.onInfswmSearch();
}
},
methods: {
handleReset() {
this.root.$refs.modelForm.resetFields();
},
onSearch() {
this.model.pageSize = 5;
this.model.pageNum = 1;
this.onInfswmSearch();
},
onInfswmSearch() {
queryByPage(this.model).then((res) => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list;
this.swmData = list;
this.model.pageNum = res.pageNumber;
this.model.pageSize = res.pageSize;
this.model.total = res.total;
});
},
queryFunc(pageNumber, pageSize) {
this.model.pageNum = pageNumber;
this.model.pageSize = pageSize;
this.onInfswmSearch();
},
swmAdd() {
this.$router.push(`/statics/dbaswm`);
},
swmInfo(index, row) {
this.$router.push({ name: "StaticsDbiswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
},
swmEdit(index, row) {
this.$router.push({name: "StaticsDbeswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
},
swmDelete(index, row) {
this.$router.push({ name: "StaticsDbdswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
},
},
};
</script>
<style scoped>
.table-button-item-list {
padding: 0;
margin: 0;
}
.table-button-item-list li {
list-style: none;
padding: 5px 0;
text-align: center;
color: #606266;
cursor: pointer;
}
</style>
<template>
<div class="eContainer">
<c-page title="报文栏位映射信息查询">
<el-form
:model="model"
ref="modelForm"
label-width="120px"
label-position="right"
size="small"
>
<c-tabs v-model="tabVal" ref="elment" type="card">
<!--PD000039 -->
<el-tab-pane label="报文栏位映射信息查询" name="infsea">
<c-content>
<m-infsea :model="model" ref="infsea" />
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
</c-page>
</div>
</template>
<script>
import Infsea from "./Infsea";
export default {
name: "StaticsInfswm",
components: {
"m-infsea": Infsea,
},
provide() {
return {
root: this,
};
},
data() {
return {
tabVal: "infsea",
model: {
frm:'',
mt:'',
fmt:'',
pageNum: 1,
pageSize: 5,
total: 0,
},
};
},
};
</script>
<style></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment