Commit 245486e4 by 潘际乾

infpta行选中显示

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