Commit 7f4a5bf7 by 李少勇

优化处理报文类型联动获取码表的问题

parent 64fcf3f9
...@@ -3,6 +3,21 @@ import moment from "moment"; ...@@ -3,6 +3,21 @@ import moment from "moment";
export default { export default {
methods: { methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
if (!rcvdatsta || rcvdatsta == "") { if (!rcvdatsta || rcvdatsta == "") {
...@@ -33,12 +48,12 @@ export default { ...@@ -33,12 +48,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -87,7 +102,7 @@ export default { ...@@ -87,7 +102,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,23 +7,20 @@ ...@@ -7,23 +7,20 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="系统名称" prop="" style="width: 100%"> <el-form-item label="系统名称" prop="" style="width: 100%">
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准" <c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准" :code="codes.subtyp" />
:code="codes.subtyp"/>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文类型" prop="" style="width: 100%"> <el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准" <c-select v-model="model.mgsp.stadat" style="width: 100%" placeholder="请选择报文标准">
:code="codes.subtyp"/> <el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="起始日期" prop="rcvdatsta" style="width: 100%"> <el-form-item label="起始日期" prop="rcvdatsta" style="width: 100%">
<c-date-picker <c-date-picker type="date" v-model="model.mgsp.stadat" style="width: 100%"></c-date-picker>
type="date"
v-model="model.mgsp.stadat"
style="width: 100%"
></c-date-picker>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
...@@ -33,11 +30,7 @@ ...@@ -33,11 +30,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="截止日期" prop="rcvdatsta" style="width: 100%"> <el-form-item label="截止日期" prop="rcvdatsta" style="width: 100%">
<c-date-picker <c-date-picker type="date" v-model="model.mgsp.stadat" style="width: 100%"></c-date-picker>
type="date"
v-model="model.mgsp.stadat"
style="width: 100%"
></c-date-picker>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -47,12 +40,7 @@ ...@@ -47,12 +40,7 @@
</c-list-search> </c-list-search>
<el-col :span="24" style="margin-top: 2px; margin-bottom: 1px"> <el-col :span="24" style="margin-top: 2px; margin-bottom: 1px">
<c-button <c-button class="medium_bcs" size="medium" style="margin-left: 0" type="primary">{{ $t("public.导出") }}
class="medium_bcs"
size="medium"
style="margin-left: 0"
type="primary"
>{{ $t("public.导出") }}
</c-button> </c-button>
</el-col> </el-col>
...@@ -61,36 +49,18 @@ ...@@ -61,36 +49,18 @@
<c-col :span="24"> <c-col :span="24">
<el-tabs v-model="activeTab" class="y-tabs"> <el-tabs v-model="activeTab" class="y-tabs">
<el-tab-pane label="汇总查询" name="fb"> <el-tab-pane label="汇总查询" name="fb">
<el-table <el-table :data="stmData.data" :columns="stmData.columns" v-loading="load" style="width: 100%"
:data="stmData.data" @selection-change="handleSelectionChange" size="small" :border="true" height="calc(100vh - 480px)"
:columns="stmData.columns" :highlight-current-row="true">
v-loading="load"
style="width: 100%"
@selection-change="handleSelectionChange"
size="small"
:border="true"
height="calc(100vh - 480px)"
:highlight-current-row="true"
>
<!-- <el-table-column type="selection" width="55"> </el-table-column> --> <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column <el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop"
v-for="(item, key) in stmData.columns" :min-width="item.width">
:key="key"
:label="item.label"
:prop="item.prop"
:min-width="item.width"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
layout="total, sizes, prev, pager, next, jumper" :page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" @size-change="handleSizeChange"
:total="pagination.total" @current-change="handleCurrentChange">
:page-size="pagination.pageSize"
:current-page.sync="pagination.pageNum"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination> </el-pagination>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -173,7 +143,9 @@ export default { ...@@ -173,7 +143,9 @@ export default {
}, },
}, },
methods: {}, methods: {},
mounted: function () {}, mounted () {
this.getSubtyp()
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -3,6 +3,21 @@ import moment from "moment"; ...@@ -3,6 +3,21 @@ import moment from "moment";
export default { export default {
methods: { methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() { async handleSearch() {
}, },
async handleReset() { async handleReset() {
...@@ -18,7 +33,7 @@ export default { ...@@ -18,7 +33,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文类型:" prop="" style="width: 100%"> <el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.cpyp.subtyp" style="width: 100%" placeholder="请选择报文类型:" <c-select v-model="model.cpyp.subtyp" style="width: 100%" placeholder="请选择报文类型">
:code="codes.subtyp"/> <el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value"></el-option>
</c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
</el-row> </el-row>
<!-- 可控展示区 --> <!-- 可控展示区 -->
...@@ -147,7 +147,8 @@ export default { ...@@ -147,7 +147,8 @@ export default {
} }
}, },
methods: {}, methods: {},
mounted: function () { mounted () {
this.getSubtyp()
}, },
}; };
</script> </script>
......
...@@ -3,6 +3,21 @@ import moment from "moment"; ...@@ -3,6 +3,21 @@ import moment from "moment";
export default { export default {
methods: { methods: {
async getSubtyp() {
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: 'CIPS'
});
if (rtnmsg.respCode == SUCCESS) {
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
async handleSearch() { async handleSearch() {
}, },
async handleReset() { async handleReset() {
...@@ -18,7 +33,7 @@ export default { ...@@ -18,7 +33,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文类型" prop="" style="width: 100%"> <el-form-item label="报文类型" prop="" style="width: 100%">
<c-select v-model="model.cpzp.subtyp" style="width: 100%" placeholder="请选择报文类型" :code="codes.subtyp" /> <c-select v-model="model.cpzp.subtyp" style="width: 100%" placeholder="请选择报文类型">
<el-option v-for="code in subtypCodes" :key="code.label" :label="code.label" :value="code.value">
</el-option>
</c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="8"> <c-col :span="8">
...@@ -153,7 +156,8 @@ export default { ...@@ -153,7 +156,8 @@ export default {
}, },
methods: { methods: {
}, },
mounted: function () { mounted () {
this.getSubtyp()
}, },
}; };
</script> </script>
......
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -33,12 +35,12 @@ export default { ...@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -87,7 +89,7 @@ export default { ...@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3"> <c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -291,23 +291,7 @@ export default { ...@@ -291,23 +291,7 @@ export default {
} }
}, },
watch: { watch: {
'model.sndp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.sndp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
}, },
......
import Api from "@/service/Api"; import Api from "@/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -33,12 +35,12 @@ export default { ...@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -87,7 +89,7 @@ export default { ...@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3"> <c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择货押标识" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -291,23 +291,7 @@ export default { ...@@ -291,23 +291,7 @@ export default {
} }
}, },
watch: { watch: {
'model.sndp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.sndp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
}, },
......
import Api from "~/service/Api";
import moment from "moment";
import _ from 'lodash';
export default {
methods: {
async getSubtyp(firstKey, currentKey) {
let mapData = {
sf2: 'MT',
iso: 'MX',
txt: 'FXPS',
xml: 'CIPS',
}
let rtnmsg = await Api.post("/frontend/common/subtyp ", {
mty: mapData[firstKey]
});
if (rtnmsg.respCode == SUCCESS) {
_.set(this.model, currentKey, '')
if (rtnmsg.data && rtnmsg.data.length > 0) {
this.subtypCodes = rtnmsg.data.map((item) => {
return {
label: item,
value: item
}
})
}
}
},
},
};
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.rcvp.rcvdatsta; let rcvdatsta = this.model.rcvp.rcvdatsta;
...@@ -33,12 +35,12 @@ export default { ...@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -75,7 +77,7 @@ export default { ...@@ -75,7 +77,7 @@ export default {
this.model.rcvp.rspsta = ""; this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = ""; this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = ""; this.model.rcvp.sta = "";
this.model.rcvp.gpi=""; this.model.rcvp.gpi = "";
}, },
// pageSize改变 // pageSize改变
handleSizeChange(val) { handleSizeChange(val) {
...@@ -88,7 +90,7 @@ export default { ...@@ -88,7 +90,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3"> <c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.rcvp.msgtyp, 'rcvp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -306,23 +306,7 @@ export default { ...@@ -306,23 +306,7 @@ export default {
} }
}, },
watch: { watch: {
'model.rcvp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.rcvp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
dbClickRow(row) { dbClickRow(row) {
......
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.rcvp.rcvdatsta; let rcvdatsta = this.model.rcvp.rcvdatsta;
...@@ -34,12 +36,12 @@ export default { ...@@ -34,12 +36,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -76,7 +78,7 @@ export default { ...@@ -76,7 +78,7 @@ export default {
this.model.rcvp.rspsta = ""; this.model.rcvp.rspsta = "";
this.model.rcvp.dtlchg = ""; this.model.rcvp.dtlchg = "";
this.model.rcvp.sta = ""; this.model.rcvp.sta = "";
this.model.rcvp.gpi=""; this.model.rcvp.gpi = "";
}, },
// pageSize改变 // pageSize改变
handleSizeChange(val) { handleSizeChange(val) {
...@@ -89,7 +91,7 @@ export default { ...@@ -89,7 +91,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3"> <c-select v-model="model.rcvp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.rcvp.msgtyp, 'rcvp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -306,23 +306,7 @@ export default { ...@@ -306,23 +306,7 @@ export default {
} }
}, },
watch: { watch: {
'model.rcvp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.rcvp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
dbClickRow(row) { dbClickRow(row) {
......
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -33,12 +35,12 @@ export default { ...@@ -33,12 +35,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -87,7 +89,7 @@ export default { ...@@ -87,7 +89,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3"> <c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -292,23 +292,7 @@ export default { ...@@ -292,23 +292,7 @@ export default {
} }
}, },
watch: { watch: {
'model.sndp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.sndp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
dbClickRow(row) { dbClickRow(row) {
......
import Api from "~/service/Api"; import Api from "~/service/Api";
import getSubtyp from '~/page/Frontend/Rcvsel/event/getSubtyp.js';
import moment from "moment"; import moment from "moment";
export default { export default {
mixins: [getSubtyp],
methods: { methods: {
async handleSearch() { async handleSearch() {
let rcvdatsta = this.model.sndp.rcvdatsta; let rcvdatsta = this.model.sndp.rcvdatsta;
...@@ -34,12 +36,12 @@ export default { ...@@ -34,12 +36,12 @@ export default {
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.load = false; this.load = false;
this.stmData.data = []; this.stmData.data = [];
const {list} = rtnmsg.data; const { list } = rtnmsg.data;
const {codes:{sta1}} = this; const { codes: { sta1 } } = this;
list.forEach(v=>{ list.forEach(v => {
for(let i in sta1){ for (let i in sta1) {
if(sta1[i].value == v.sta){ if (sta1[i].value == v.sta) {
v.sta = sta1[i].label; v.sta = sta1[i].label;
} }
} }
...@@ -88,7 +90,7 @@ export default { ...@@ -88,7 +90,7 @@ export default {
this.pagination.pageNum = val; this.pagination.pageNum = val;
this.handleSearch(); this.handleSearch();
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
} }
}, },
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<c-col :span="24"> <c-col :span="24">
<c-col :span="8"> <c-col :span="8">
<el-form-item label="报文标准" prop="msgtyp" style="width: 100%"> <el-form-item label="报文标准" prop="msgtyp" style="width: 100%">
<c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3"> <c-select v-model="model.sndp.msgtyp" style="width: 100%" placeholder="请选择报文标准" :code="codes.msgtyp3" @change="getSubtyp(model.sndp.msgtyp, 'sndp.subtyp')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
...@@ -292,23 +292,7 @@ export default { ...@@ -292,23 +292,7 @@ export default {
} }
}, },
watch: { watch: {
'model.sndp.msgtyp': {
handler: function (newTyp, oldTyp) {
// 把已经选择的 subtyp 重置
this.model.sndp.subtyp = '';
const { codes } = this;
if (newTyp === 'sf2') {
this.subtypCodes = codes.mttyp;
} else if (newTyp === 'iso') {
this.subtypCodes = codes.isotyp;
} else if (newTyp === 'txt') {
this.subtypCodes = codes.fmttyp;
} else {
this.subtypCodes = codes.cipstyp;
}
},
deep: true
}
}, },
methods: { methods: {
dbClickRow(row) { dbClickRow(row) {
......
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