Commit 7d87bd42 by liaoxing

Merge branch 'development-202206' of http://114.115.138.98:8900/fukai/vue-gjjs…

Merge branch 'development-202206' of http://114.115.138.98:8900/fukai/vue-gjjs into development-202206
parents 82e6c9bd f19d7271
...@@ -6747,7 +6747,7 @@ const CodeTable = { ...@@ -6747,7 +6747,7 @@ const CodeTable = {
{label:"CPDGRP",value:"CPDGRP"}, {label:"CPDGRP",value:"CPDGRP"},
], ],
ovwflg:[ ovwflg:[
{label:"是",value:""}, {label:"是",value:" "},
{label:"否",value:"N"} {label:"否",value:"N"}
], ],
met:[ met:[
......
...@@ -19,3 +19,6 @@ export function edit(data) { ...@@ -19,3 +19,6 @@ export function edit(data) {
export function deleteById(data) { export function deleteById(data) {
return Api.post(`/manager/swm/deleteById`,data) return Api.post(`/manager/swm/deleteById`,data)
} }
export function count(data) {
return Api.post(`/manager/swm/count`,data)
}
\ No newline at end of file
<template>
<m-swm title="dbeswm" type="edit"></m-swm>
</template>
<script>
import Dbiswm from "~/views/Statics/Dbiswm";
export default {
name: "StaticsDbeswm",
components: {
"m-swm": Dbiswm
},
data() {
return {};
},
};
</script>
<style>
</style>
\ No newline at end of file
...@@ -140,10 +140,28 @@ ...@@ -140,10 +140,28 @@
<script> <script>
import codes from "~/config/CodeTable"; import codes from "~/config/CodeTable";
export default { export default {
props:["model","codes"], props:{
model:Object,
codes:Object,
swmFn:Function
},
data(){ data(){
return{ return{
dataList:[] dataList:[],
dataModel:{
fmt:'',
mt:'',
frm:'',
tag:'',
subtag:'',
dst:'',
ins:'',
met:'',
cpyflg:'',
ovwflg:'',
dstgrp:'',
altmapflg:''
}
} }
}, },
methods:{ methods:{
...@@ -152,7 +170,12 @@ export default { ...@@ -152,7 +170,12 @@ export default {
}, },
addRowSetfol() { addRowSetfol() {
let newRow = { ...this.newdialog }; let newRow = { ...this.newdialog };
this.dataList.splice(0, 0, newRow); 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() { removeRowSetfol() {
this.dataList.shift(); this.dataList.shift();
......
<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
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
<c-col :span="12" class="col-left"> <c-col :span="12" class="col-left">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="报文格式" prop="fmt"> <el-form-item label="报文格式" prop="fmt">
<c-select v-model="model1.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%"> <c-select v-model="model1.fmt" placeholder="请选择报文格式" :code="getCodesByKey('fmt')" style="width:100%" disabled>
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="映射交易" prop="frm"> <el-form-item label="映射交易" prop="frm">
<c-input v-model="model1.frm" placeholder="请输入映射交易"> </c-input> <c-input v-model="model1.frm" placeholder="请输入映射交易" disabled> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
<c-col :span="12" class="col-right"> <c-col :span="12" class="col-right">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="报文类型" prop="mt"> <el-form-item label="报文类型" prop="mt">
<c-select v-model="model1.mt" placeholder="请选择报文类型" :code="getCodesByKey('mt')" style="width:100%"></c-select> <c-select v-model="model1.mt" placeholder="请选择报文类型" :code="getCodesByKey('mt')" style="width:100%" disabled></c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
return { return {
swmData: [], swmData: [],
swmColumns: [ swmColumns: [
{ label: "报文元素", prop: "tag", width: "auto" }, { label: "报文元素", prop: "tag", width: "auto"},
{ label: "报文元素id", prop: "subtag", width: "auto" }, { label: "报文元素id", prop: "subtag", width: "auto" },
{ label: "映射模型组", prop: "dstgrp", width: "auto" }, { label: "映射模型组", prop: "dstgrp", width: "auto" },
{ label: "映射字段", prop: "dst", width: "auto" }, { label: "映射字段", prop: "dst", width: "auto" },
......
...@@ -9,15 +9,20 @@ ...@@ -9,15 +9,20 @@
:model="model" :model="model"
:rules="rules" :rules="rules"
:validate-on-rule-change="false" :validate-on-rule-change="false"
:disabled="isDisabled"
> >
<c-tabs v-model="tabVal" ref="elment" type="card"> <c-tabs v-model="tabVal" ref="elment" type="card">
<el-tab-pane label="报文栏位映射信息" name="swm"> <el-tab-pane label="报文栏位映射信息" name="swm">
<c-content v-show="this.type=='info'|| this.type=='delete'"> <c-content v-show="this.type=='info'">
<m-swm-info :swmModel="swmModel" :model1="model1" /> <m-swm-info :swmModel="swmModel" :model1="model1" />
</c-content> </c-content>
<c-content v-show="this.type=='add'"> <c-content v-show="this.type=='add'">
<m-swm-add :model="model" :codes="codes"></m-swm-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> </c-content>
</el-tab-pane> </el-tab-pane>
</c-tabs> </c-tabs>
...@@ -57,14 +62,18 @@ import Swm, { Pattern } from "./Swm.js"; ...@@ -57,14 +62,18 @@ import Swm, { Pattern } from "./Swm.js";
import SwmInfo from "./SwmInfo.vue"; import SwmInfo from "./SwmInfo.vue";
import SwmAdd from "./SwmAdd"; import SwmAdd from "./SwmAdd";
import SwmEdit from "./SwmEdit.vue"
import SwmDelete from "./SwmDelete.vue";
import { queryById, add, edit, deleteById } from "~/service/test/swm.js"; import { queryById, add, edit, deleteById,count } from "~/service/test/swm.js";
export default { export default {
name: "StaticsDbiswm", name: "StaticsDbiswm",
components: { components: {
"m-swm-info": SwmInfo, "m-swm-info": SwmInfo,
"m-swm-add":SwmAdd "m-swm-add":SwmAdd,
"m-swm-edit":SwmEdit,
"m-swm-delete":SwmDelete
}, },
provide() { provide() {
return { return {
...@@ -94,6 +103,7 @@ export default { ...@@ -94,6 +103,7 @@ export default {
pageSize: 5, pageSize: 5,
total: 0, total: 0,
}, },
dataModels:{},
swmModel:[], swmModel:[],
codes: {...CodeTable codes: {...CodeTable
}, },
...@@ -118,12 +128,23 @@ export default { ...@@ -118,12 +128,23 @@ export default {
} }
}, },
methods: { 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() { commitAdd() {
this.$refs.modelForm.validate((validated) => { this.$refs.modelForm.validate((validated) => {
if (validated) { if (validated) {
console.log("=======") console.log(this.dataModels)
console.log(this.model) add(this.dataModels)
add(this.model)
.then((res) => { .then((res) => {
this.$message.success("保存成功!"); this.$message.success("保存成功!");
this.goBack(true) this.goBack(true)
...@@ -137,43 +158,12 @@ export default { ...@@ -137,43 +158,12 @@ export default {
}); });
}, },
commitEdit() { commitEdit() {
this.$refs.modelForm.validate((validated) => {
if (validated) {
edit(this.model)
.then((res) => {
this.$message.success("保存成功!"); this.$message.success("保存成功!");
this.goBack(true) this.goBack(true)
})
.catch((err) => {
this.$message.error("保存失败!");
});
} else {
Utils.formValidateTips(this.$refs.modelForm.fields)
}
});
}, },
commitDelete() { commitDelete() {
this.$confirm("是否确认删除?", "提示", { this.$message.success("保存成功!");
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteById(this.model1)
.then((res) => {
this.$message.success("删除成功!");
this.goBack(true) this.goBack(true)
})
.catch((err) => {
this.$message.error("删除失败!");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
}, },
/** /**
* update 是否更新infswm的查询列表 * update 是否更新infswm的查询列表
......
...@@ -67,23 +67,6 @@ ...@@ -67,23 +67,6 @@
@click="swmDelete(scope.$index, scope.row)" @click="swmDelete(scope.$index, scope.row)"
>删除</c-button >删除</c-button
> >
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0">指派</c-button>
</li>
<li>
<c-button size="small" style="margin-left: 0">删除</c-button>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
>
<i class="el-icon-more"></i>
</a>
</el-popover>
</template> </template>
</c-table-column> </c-table-column>
</c-paging-table> </c-paging-table>
...@@ -167,7 +150,7 @@ export default { ...@@ -167,7 +150,7 @@ export default {
this.$router.push({ name: "StaticsDbiswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } }); this.$router.push({ name: "StaticsDbiswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
}, },
swmEdit(index, row) { swmEdit(index, row) {
this.$router.push(`/statics/dbeswm/${row.inr}`); this.$router.push({name: "StaticsDbeswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
}, },
swmDelete(index, row) { swmDelete(index, row) {
this.$router.push({ name: "StaticsDbdswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } }); this.$router.push({ name: "StaticsDbdswm", params: { mt: row.mt, fmt: row.fmt, frm: row.frm,pageSize: 5,pageNum: 1 } });
......
...@@ -122,6 +122,7 @@ import Infswm from "./Infswm"; ...@@ -122,6 +122,7 @@ import Infswm from "./Infswm";
import Dbiswm from "./Dbiswm"; import Dbiswm from "./Dbiswm";
import Dbaswm from "./Dbaswm" import Dbaswm from "./Dbaswm"
import Dbdswm from "./Dbdswm" import Dbdswm from "./Dbdswm"
import Dbeswm from "./Dbeswm"
import Inftdh from "./Inftdh"; import Inftdh from "./Inftdh";
import Dbitdh from "./Dbitdh"; import Dbitdh from "./Dbitdh";
...@@ -281,7 +282,7 @@ const StaticsRouter = [ ...@@ -281,7 +282,7 @@ const StaticsRouter = [
{ path: 'infswm', component: Infswm, name: 'StaticsInfswm', meta: { title: '报文栏位映射信息查询' } }, { path: 'infswm', component: Infswm, name: 'StaticsInfswm', meta: { title: '报文栏位映射信息查询' } },
{ path: 'dbaswm', component: Dbaswm, name: 'StaticsDbaswm', meta: { title: '报文栏位映射信息新增' } }, { path: 'dbaswm', component: Dbaswm, name: 'StaticsDbaswm', meta: { title: '报文栏位映射信息新增' } },
{ path: 'dbiswm', component: Dbiswm, name: 'StaticsDbiswm', meta: { title: '报文栏位映射信息详情: ' } }, { path: 'dbiswm', component: Dbiswm, name: 'StaticsDbiswm', meta: { title: '报文栏位映射信息详情: ' } },
// { path: 'dbeswm/:inr', component: Dbeswm, name: 'StaticsDbeswm', meta: { title: (tag) => { return '报文栏位映射信息修改: ' + tag.params.inr } } }, { path: 'dbeswm', component: Dbeswm, name: 'StaticsDbeswm', meta: { title: '报文栏位映射信息修改: ' } },
{ path: 'dbdswm', component: Dbdswm, name: 'StaticsDbdswm', meta: { title: '报文栏位映射信息删除: ' } }, { path: 'dbdswm', component: Dbdswm, name: 'StaticsDbdswm', meta: { title: '报文栏位映射信息删除: ' } },
{ path: 'inftdh', component: Inftdh, name: 'StaticsInftdh', meta: { title: '节假日查询' } }, { path: 'inftdh', component: Inftdh, name: 'StaticsInftdh', meta: { title: '节假日查询' } },
{ path: 'dbatdh', component: Dbatdh, name: 'StaticsDbatdh', meta: { title: '节假日新增' } }, { path: 'dbatdh', component: Dbatdh, name: 'StaticsDbatdh', meta: { title: '节假日新增' } },
......
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