工作动态修改添加点击事件方式

lijinlong
吕天方 2 years ago
parent 12d88b10bd
commit 46ffb61c56

@ -4,8 +4,6 @@ ENV = 'development'
# base api # base api
VUE_APP_BASE_API = '/dashboard' VUE_APP_BASE_API = '/dashboard'
VUE_APP_BASE_API2 = 'http://192.168.0.108:9027' VUE_APP_BASE_API2 = 'http://39.101.188.84:9027'
VUE_APP_BASE_API3 = 'http://39.101.188.84:9027'
BASE_API = 'http://10.10.3.35:9070' BASE_API = 'http://10.10.3.35:9070'

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览左侧 * @Description: 总体概览左侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-08-23 17:15:27 * @LastEditTime: 2023-08-24 13:47:44
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue
--> -->
<template> <template>
@ -143,29 +143,30 @@
</div> </div>
<div class="section-dynamic"> <div class="section-dynamic">
<module-title>工作动态</module-title> <module-title>工作动态</module-title>
<vue-seamless-scroll <div @click="dynamicClick($event)">
:data="dynamicList" <vue-seamless-scroll
:class-option="classOption" :data="dynamicList"
class="scroll_box" :class-option="classOption"
> class="scroll_box"
<div
v-for="(item, idx) in dynamicList"
:key="idx"
class="scroll_item"
@click.stop="dynamicClick(item)"
> >
<div class="item_txt"> <div
<!-- materialsName --> v-for="(item, idx) in dynamicList"
<span :data-obj="item.name"> :key="idx"
{{ item.name }} class="scroll_item"
</span> >
</div> <div class="item_txt">
<div class="item_bottom"> <!-- materialsName -->
<div class="bottom_icon"></div> <span :data-id="item.id">
<div class="bottom_name">{{ item.type }}</div> {{ item.name }}
</span>
</div>
<div class="item_bottom" :data-id="item.id">
<div class="bottom_icon"></div>
<div class="bottom_name" :data-id="item.id">{{ item.type }}</div>
</div>
</div> </div>
</div> </vue-seamless-scroll>
</vue-seamless-scroll> </div>
</div> </div>
<div class="section-ecosphere"> <div class="section-ecosphere">
<module-title> <module-title>
@ -333,10 +334,11 @@
ref="fileDoc" ref="fileDoc"
class="file-content" class="file-content"
></div> ></div>
<div v-if="fileExtension === 'pdf'" class="file-content"> <div v-if="fileExtension === 'pdf'" class="file-content file-content-pdf">
<div v-for="i in numPages" :key="i"> <iframe style="height: 100%; width: 100%" :src="pdfUrl"></iframe>
<!-- <div v-for="i in numPages" :key="i">
<pdf ref="pdf" :key="i" :src="pdfUrl" :page="i"></pdf> <pdf ref="pdf" :key="i" :src="pdfUrl" :page="i"></pdf>
</div> </div> -->
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -1029,11 +1031,11 @@ export default {
this.currentPage = val this.currentPage = val
this.setCurrentPageData() this.setCurrentPageData()
}, },
async dynamicClick(item) { async dynamicClick(e) {
this.tableData = [] this.tableData = []
this.currentPage = 1 this.currentPage = 1
this.pageSize = 10 this.pageSize = 10
let data = await dongtaiInfo(item.id) let data = await dongtaiInfo(e.target.dataset.id)
// console.log(data) // console.log(data)
this.tableHeader= ['材料名称'] this.tableHeader= ['材料名称']
this.dialogTitle = data.data.materialsName this.dialogTitle = data.data.materialsName
@ -1073,14 +1075,14 @@ export default {
this.setCurrentPageData() this.setCurrentPageData()
}, },
rowClick(row) { rowClick(row) {
console.log(row)
// this.dialogDetails = true // this.dialogDetails = true
console.log(process.env.VUE_APP_BASE_API2 + row['材料路径']) // console.log(process.env.VUE_APP_BASE_API2 + row[''])
this.fileExtension = row['材料路径'].substring( this.fileExtension = row['材料路径'].substring(
row['材料路径'].lastIndexOf('.') + 1 row['材料路径'].lastIndexOf('.') + 1
) )
if (this.fileExtension == "pdf") { if (this.fileExtension == "pdf") {
this.getNumPages(`${process.env.NODE_ENV === 'production' ? window._CONFIG['fileNginxUrl'] : process.env.VUE_APP_BASE_API2}${row['材料路径']}`) this.pdfUrl = process.env.VUE_APP_BASE_API2 + row['材料路径'];
this.dialogDetails = true
} else if ( } else if (
this.fileExtension === "docx" || this.fileExtension === "docx" ||
this.fileExtension === "doc" this.fileExtension === "doc"
@ -1090,7 +1092,6 @@ export default {
responseType: "blob", // responseType: "blob", //
url: process.env.VUE_APP_BASE_API2 + row['材料路径'], url: process.env.VUE_APP_BASE_API2 + row['材料路径'],
}).then(({ data }) => { }).then(({ data }) => {
console.log(data,'docx,doc')
if (data) { if (data) {
this.dialogDetails = true; this.dialogDetails = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -1109,7 +1110,7 @@ export default {
// url: `${ // url: `${
// process.env.NODE_ENV === 'production' // process.env.NODE_ENV === 'production'
// ? window._CONFIG['fileNginxUrl'] // ? window._CONFIG['fileNginxUrl']
// : process.env.VUE_APP_BASE_API3 // : process.env.VUE_APP_BASE_API2
// }${row['']}` // }${row['']}`
// }).then(({ data }) => { // }).then(({ data }) => {
// if (data) { // if (data) {
@ -1786,6 +1787,9 @@ export default {
transform: scale(1.5); transform: scale(1.5);
height: 440px; height: 440px;
} }
.file-content-pdf {
height: 580px;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.file-content .docx-wrapper { .file-content .docx-wrapper {

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览右侧 * @Description: 总体概览右侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-08-23 17:24:37 * @LastEditTime: 2023-08-24 13:26:32
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentRight.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentRight.vue
--> -->
<template> <template>
@ -111,7 +111,7 @@
<div class="img-item" :data-curData="index"> <div class="img-item" :data-curData="index">
<div <div
:style="{ :style="{
backgroundImage: 'url(' + imgUrl + item.zhuanxiangImg[0] + ')', backgroundImage: 'url(' + item.zhuanxiangImg + ')',
}" }"
:data-curData="index" :data-curData="index"
style=" style="
@ -197,51 +197,51 @@ export default {
data: [ data: [
{ {
name: '2月', name: '2月',
num: 19552 num: 0
}, },
{ {
name: '1月', name: '1月',
num: 9938 num: 0
}, },
{ {
name: '12月', name: '12月',
num: 16495 num: 0
}, },
{ {
name: '11月', name: '11月',
num: 12379 num: 0
}, },
{ {
name: '10月', name: '10月',
num: 12753 num: 0
}, },
{ {
name: '9月', name: '9月',
num: 17786 num: 0
}, },
{ {
name: '8月', name: '8月',
num: 16668 num: 0
}, },
{ {
name: '7月', name: '7月',
num: 16427 num: 0
}, },
{ {
name: '6月', name: '6月',
num: 15503 num: 0
}, },
{ {
name: '5月', name: '5月',
num: 21079 num: 0
}, },
{ {
name: '4月', name: '4月',
num: 13871 num: 0
}, },
{ {
name: '3月', name: '3月',
num: 12166 num: 0
} }
] ]
@ -251,51 +251,51 @@ export default {
data: [ data: [
{ {
name: '2月', name: '2月',
num: 64 num: 0
}, },
{ {
name: '1月', name: '1月',
num: 36 num: 0
}, },
{ {
name: '12月', name: '12月',
num: 48 num: 0
}, },
{ {
name: '11月', name: '11月',
num: 68 num: 0
}, },
{ {
name: '10月', name: '10月',
num: 86 num: 0
}, },
{ {
name: '9月', name: '9月',
num: 20 num: 0
}, },
{ {
name: '8月', name: '8月',
num: 199 num: 0
}, },
{ {
name: '7月', name: '7月',
num: 183 num: 0
}, },
{ {
name: '6月', name: '6月',
num: 220 num: 0
}, },
{ {
name: '5月', name: '5月',
num: 111 num: 0
}, },
{ {
name: '4月', name: '4月',
num: 116 num: 0
}, },
{ {
name: '3月', name: '3月',
num: 39 num: 0
} }
] ]
@ -329,8 +329,8 @@ export default {
clearInterval(this.time) clearInterval(this.time)
}, },
mounted() { mounted() {
// this.qlzxdtList = qlzxdtData // this.qlzxdtList = qlzxdtDatas
this.imgUrl = process.env.VUE_APP_BASE_API3 this.imgUrl = process.env.VUE_APP_BASE_API2
// //
this.reportingProcessTimer() this.reportingProcessTimer()
this.zhuanxiangList() // this.zhuanxiangList() //
@ -364,7 +364,7 @@ export default {
for(let i = 0; i < this.qlzxdtList.length; i++){ for(let i = 0; i < this.qlzxdtList.length; i++){
imgArr = this.qlzxdtList[i].zhuanxiangImg imgArr = this.qlzxdtList[i].zhuanxiangImg
imgArr = imgArr.split(',') imgArr = imgArr.split(',')
this.qlzxdtList[i].zhuanxiangImg = imgArr this.qlzxdtList[i].zhuanxiangImg = this.imgUrl + imgArr[0]
} }
}, },
// //

Loading…
Cancel
Save