Commit 245486e4 by 潘际乾

infpta行选中显示

parent 9bff0f4d
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
tableColumns() { tableColumns() {
const columnArr = [] const columnArr = []
const lines = this.columns; const lines = this.columns;
const etyReg = /\"(\w*(\s?|\/?)\w*)\"/ const etyReg = /\"([^\"]*)\"/
const obj = {} const obj = {}
for (let i = 0; i < lines.length; i++) { for (let i = 0; i < lines.length; i++) {
const line = lines[i]; const line = lines[i];
...@@ -156,6 +156,7 @@ export default { ...@@ -156,6 +156,7 @@ export default {
// 行点击,设置高亮 // 行点击,设置高亮
rowClick(row, column, event) { rowClick(row, column, event) {
this.$refs.table.setCurrentRow(row); this.$refs.table.setCurrentRow(row);
this.$emit("chooseRowEvent", row)
} }
} }
}; };
......
...@@ -14,7 +14,8 @@ export default { ...@@ -14,7 +14,8 @@ export default {
let rtnmsg = await this.executeRule("infbut.dsp") let rtnmsg = await this.executeRule("infbut.dsp")
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
this.updateModel(rtnmsg.data);
this.tabVal = "ptap0"
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
......
...@@ -16,6 +16,7 @@ export default class Infpta{ ...@@ -16,6 +16,7 @@ export default class Infpta{
seatypa:"", // Own Address .seatypa seatypa:"", // Own Address .seatypa
seatypo:"", // Other .seatypo seatypo:"", // Other .seatypo
infbut:{ infbut:{
selrow:0, // Number of selected row
dspstm:{}, // display stream .infbut.dspstm dspstm:{}, // display stream .infbut.dspstm
}, },
seatyph:"", // 海关 .seatyph seatyph:"", // 海关 .seatyph
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
:border="true" :border="true"
:list="tableData" :list="tableData"
:columns="columns" :columns="columns"
v-on:chooseRowEvent="chooseRowEvent"
style="width:80%,text-align:center"> style="width:80%,text-align:center">
<!-- <el-table-column label="Address No" width="auto"></el-table-column> <!-- <el-table-column label="Address No" width="auto"></el-table-column>
<el-table-column label="Adress Name" width="auto"></el-table-column> <el-table-column label="Adress Name" width="auto"></el-table-column>
...@@ -207,6 +208,9 @@ export default { ...@@ -207,6 +208,9 @@ export default {
this.model.seatypo = ''; this.model.seatypo = '';
this.model.seatyph = ''; this.model.seatyph = '';
}, },
chooseRowEvent(row) {
this.model.infbut.selrow = row.IDX + 1;
},
...Event ...Event
}, },
created: function() {}, created: function() {},
......
...@@ -48,13 +48,23 @@ ...@@ -48,13 +48,23 @@
</c-col> </c-col>
<c-col :span="12"> <c-col :span="12">
<c-button size="small" type="primary" @click="onInfbutDsp"> <c-button v-show="tabVal === 'infsea'" size="small" type="primary" @click="onInfbutDsp" :disabled="model.infbut.selrow === 0">
Display Display
</c-button> </c-button>
<el-button-group v-show="tabVal !== 'infsea'" >
<c-button type="primary" icon="el-icon-arrow-left" style="width: 50%;"
@click="onInfbutDsp(--model.infbut.selrow)"
:disabled="model.infbut.selrow <= 1">
</c-button>
<c-button type="primary" icon="el-icon-arrow-right" style="width: 50%;"
@click="onInfbutDsp(++model.infbut.selrow)"
:disabled="!model.infbut.dspstm.rows || model.infbut.dspstm.rows.length === 0 || model.infbut.selrow === model.infbut.dspstm.rows.length">
</c-button>
</el-button-group>
</c-col> </c-col>
<c-col :span="12"> <c-col :span="12">
<c-button size="small" type="primary" @click="onInfbutUserow"> <c-button size="small" type="primary" @click="onInfbutUserow" :disabled="model.infbut.selrow === 0">
Use Use
</c-button> </c-button>
</c-col> </c-col>
......
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