Commit 299f5d49 by 张超军

查询与认定-展开收缩,分页样式调整

parent 94f3740e
...@@ -304,19 +304,21 @@ ...@@ -304,19 +304,21 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="140" label="操作"> <el-table-column width="auto" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
class="img" class="img"
@click="edit(scope.row)" @click="edit(scope.row)"
type="text" type="text"
style="font-size:24px" style="font-size:24px"
v-if="scope.row.barcode"
> >
<i> <i>
<img style="width:16px;height:16px" :src="editUrl" alt /> <img style="width:16px;height:16px" :src="editUrl" alt />
</i> </i>
</div> </div>
<div <div
v-if="scope.row.barcode"
class="img" class="img"
@click="delOne(scope.row.qqid)" @click="delOne(scope.row.qqid)"
type="text" type="text"
...@@ -447,7 +449,8 @@ export default { ...@@ -447,7 +449,8 @@ export default {
{ value: "99", name: "标记删除", type: "querystates" }, { value: "99", name: "标记删除", type: "querystates" },
{ value: "-1", name: "无效", type: "querystates" }, { value: "-1", name: "无效", type: "querystates" },
{ value: "-2", name: "同步特征", type: "querystates" } { value: "-2", name: "同步特征", type: "querystates" }
] ],
expanded: false // 展开标志
// arr: [] // arr: []
}; };
}, },
...@@ -459,7 +462,7 @@ export default { ...@@ -459,7 +462,7 @@ export default {
); );
//挑选被选中的对象 //挑选被选中的对象
this.key = this.key + 1; //为了保证table 每次都会重渲,这样做体验感更好,如果不为table设置key值的话,用户一旦选中了复选框选项,就是在原来table基础上添加删除每一列,页面就有跳动的感觉,体验感不好 this.key = this.key + 1; //为了保证table 每次都会重渲,这样做体验感更好,如果不为table设置key值的话,用户一旦选中了复选框选项,就是在原来table基础上添加删除每一列,页面就有跳动的感觉,体验感不好
} },
}, },
computed: { computed: {
// 计算总页数 // 计算总页数
...@@ -666,18 +669,20 @@ export default { ...@@ -666,18 +669,20 @@ export default {
edit() {}, edit() {},
// 展开或关闭行 // 展开或关闭行
hadnlExpandChange(row, expanded) { hadnlExpandChange(row, expanded) {
// 获取展开标志
this.expanded = expanded
// 获取下标 // 获取下标
var i = this.list.findIndex(table => table.queryId === row.queryId); var i = this.list.findIndex(table => table.queryId === row.queryId);
// var i = this.tableData.findIndex(table => table.id === row.id); // var i = this.tableData.findIndex(table => table.id === row.id);
console.log(i); console.log(i);
if (expanded) { if (expanded) {
console.info("展开时row数据", this.list[i]);
this.list[i] = { this.list[i] = {
qid: row.qid, qid: row.qid,
children: row.children, children: row.children,
queryId: row.queryId queryId: row.queryId,
}; };
this.$forceUpdate(); this.$forceUpdate();
console.info("展开时row数据", this.list[i]);
// this.$set(this.tableData[i], "barcode", ""); // this.$set(this.tableData[i], "barcode", "");
// 保证临时变量中存在下标属性,方便后续折叠时取值 // 保证临时变量中存在下标属性,方便后续折叠时取值
//row.index = i; //row.index = i;
...@@ -1126,7 +1131,7 @@ const setQueryClass = [ ...@@ -1126,7 +1131,7 @@ const setQueryClass = [
right: 34px; right: 34px;
} }
/deep/ .btn-next { /deep/ .btn-next {
// margin-right: 120px; margin-right: 120px !important;
} }
.el-dropdown-menu { .el-dropdown-menu {
...@@ -1401,15 +1406,29 @@ b { ...@@ -1401,15 +1406,29 @@ b {
background-size: 16px; background-size: 16px;
} }
</style> </style>
<style> <style lang="scss">
.el-table__expand-icon { .el-table__expand-icon {
position: absolute; position: absolute;
right: 20px; right: 20px;
cursor: pointer; cursor: pointer;
color: #b51f1f; color: #b51f1f;
transition: transform 0.2s ease-in-out; transition: transform 0.2s ease-in-out;
height: 20px; width: 11px;
border: black 1px solid; height: 11px;
/* border: black 1px solid; */
margin: 0; margin: 0;
background-image: url('../../assets/img/confirm/expend.png');
background-position: center;
background-size: 11px;
background-repeat: no-repeat;
}
.el-table__expand-icon.el-table__expand-icon--expanded {
width: 11px;
height: 11px;
background-image: url('../../assets/img/confirm/shrink.png');
background-position: center;
background-size: 11px;
background-repeat: no-repeat;
transform: rotate(180deg) !important;
} }
</style> </style>
...@@ -257,7 +257,11 @@ export default { ...@@ -257,7 +257,11 @@ export default {
}) })
// 平面 // 平面
let fingerPain = await this.$axios let fingerPain = await this.$axios
.get(`/api/org/plainByBarcode/${barcode}`) .post(`/api/org/plainByBarcode/barcode`, {
barcode: barcode,
qqid: self.qqid,
querytype: '2'
})
console.log(fingerPain); console.log(fingerPain);
if (fingerPain.data.ret && fingerPain.data.ret.length > 0) { if (fingerPain.data.ret && fingerPain.data.ret.length > 0) {
fingerPain.data.ret.forEach(element => { fingerPain.data.ret.forEach(element => {
...@@ -282,7 +286,7 @@ export default { ...@@ -282,7 +286,7 @@ export default {
} }
}) })
} }
console.log(fingerPain.data.ret.length); // console.log(fingerPain.data.ret.length);
self.fingerTotalPain = fingerPain.data.ret.length self.fingerTotalPain = fingerPain.data.ret.length
}); });
} else { } else {
...@@ -299,7 +303,11 @@ export default { ...@@ -299,7 +303,11 @@ export default {
// 滚动 // 滚动
let fingerRoll = await this.$axios let fingerRoll = await this.$axios
.get(`/api/org/rollByBarcode/${barcode}`) .post(`/api/org/rollByBarcode/barcode`, {
barcode: barcode,
qqid: self.qqid,
querytype: '2'
})
console.log(fingerRoll); console.log(fingerRoll);
if (fingerRoll.data.ret && fingerRoll.data.ret.length > 0) { if (fingerRoll.data.ret && fingerRoll.data.ret.length > 0) {
fingerRoll.data.ret.forEach(element => { fingerRoll.data.ret.forEach(element => {
...@@ -747,4 +755,5 @@ label { ...@@ -747,4 +755,5 @@ label {
/deep/.el-checkbox { /deep/.el-checkbox {
color: #666; color: #666;
} }
</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