Commit f2dbb636 by gao_yingdong

人员档案

parent 887bf89b
...@@ -19,11 +19,19 @@ ...@@ -19,11 +19,19 @@
<div class="zp"> <div class="zp">
<!-- :src="'data:image/gif;base64,' + ryjbxx.edzzplj" --> <!-- :src="'data:image/gif;base64,' + ryjbxx.edzzplj" -->
<img <img
v-if="srcZp"
@mouseover="zpShow" @mouseover="zpShow"
id="zp" id="zp"
src="/" :src="srcZp"
style="height: 160px; width: 84%" style="height: 160px; width: 84%"
/> />
<img
style="height: 160px; width: 84%"
@mouseover="zpShow"
v-else
src="@/assets/img/dangan/961.png"
alt=""
/>
<div> <div>
<i @click="szzTp" class="el-icon-caret-left"></i> <i @click="szzTp" class="el-icon-caret-left"></i>
<i @click="xzzTp" class="el-icon-caret-right"></i> <i @click="xzzTp" class="el-icon-caret-right"></i>
...@@ -1399,6 +1407,7 @@ export default { ...@@ -1399,6 +1407,7 @@ export default {
}, },
], ],
zpShowXxs: false, zpShowXxs: false,
srcZp: "",
}; };
}, },
mounted() { mounted() {
...@@ -2166,14 +2175,16 @@ export default { ...@@ -2166,14 +2175,16 @@ export default {
var img = document.getElementById("zp"); var img = document.getElementById("zp");
this.indexPhoto--; this.indexPhoto--;
if (this.indexPhoto < 0) this.indexPhoto = this.photo.length - 1; if (this.indexPhoto < 0) this.indexPhoto = this.photo.length - 1;
img.src = this.photo[this.indexPhoto].zpDzwjnr; // img.src = this.photo[this.indexPhoto].zpDzwjnr;
this.srcZp = this.photo[this.indexPhoto].zpDzwjnr;
}, },
// 下一张图片 // 下一张图片
xzzTp() { xzzTp() {
var img = document.getElementById("zp"); var img = document.getElementById("zp");
this.indexPhoto++; this.indexPhoto++;
if (this.indexPhoto > this.photo.length - 1) this.indexPhoto = 0; if (this.indexPhoto > this.photo.length - 1) this.indexPhoto = 0;
img.src = this.photo[this.indexPhoto].zpDzwjnr; // img.src = this.photo[this.indexPhoto].zpDzwjnr;
this.srcZp = this.photo[this.indexPhoto].zpDzwjnr;
}, },
getwpxx() { getwpxx() {
let self = this; let self = this;
...@@ -2264,8 +2275,9 @@ export default { ...@@ -2264,8 +2275,9 @@ export default {
self.tableDataZp = res.data.rows; self.tableDataZp = res.data.rows;
self.tableDataLength = res.data.total; self.tableDataLength = res.data.total;
var index = 0; var index = 0;
var img = document.getElementById("zp"); // var img = document.getElementById("zp");
img.src = res.data.rows[index].zpDzwjnr; // img.src = res.data.rows[index].zpDzwjnr;
self.srcZp = res.data.rows[index].zpDzwjnr;
self.photo = res.data.rows; self.photo = res.data.rows;
self.tableLoading = false; self.tableLoading = false;
} else { } else {
......
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