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

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

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

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

@ -3,7 +3,7 @@
* @Author: kery.chen
* @Description: 总体概览右侧
* @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
-->
<template>
@ -111,7 +111,7 @@
<div class="img-item" :data-curData="index">
<div
:style="{
backgroundImage: 'url(' + imgUrl + item.zhuanxiangImg[0] + ')',
backgroundImage: 'url(' + item.zhuanxiangImg + ')',
}"
:data-curData="index"
style="
@ -197,51 +197,51 @@ export default {
data: [
{
name: '2月',
num: 19552
num: 0
},
{
name: '1月',
num: 9938
num: 0
},
{
name: '12月',
num: 16495
num: 0
},
{
name: '11月',
num: 12379
num: 0
},
{
name: '10月',
num: 12753
num: 0
},
{
name: '9月',
num: 17786
num: 0
},
{
name: '8月',
num: 16668
num: 0
},
{
name: '7月',
num: 16427
num: 0
},
{
name: '6月',
num: 15503
num: 0
},
{
name: '5月',
num: 21079
num: 0
},
{
name: '4月',
num: 13871
num: 0
},
{
name: '3月',
num: 12166
num: 0
}
]
@ -251,51 +251,51 @@ export default {
data: [
{
name: '2月',
num: 64
num: 0
},
{
name: '1月',
num: 36
num: 0
},
{
name: '12月',
num: 48
num: 0
},
{
name: '11月',
num: 68
num: 0
},
{
name: '10月',
num: 86
num: 0
},
{
name: '9月',
num: 20
num: 0
},
{
name: '8月',
num: 199
num: 0
},
{
name: '7月',
num: 183
num: 0
},
{
name: '6月',
num: 220
num: 0
},
{
name: '5月',
num: 111
num: 0
},
{
name: '4月',
num: 116
num: 0
},
{
name: '3月',
num: 39
num: 0
}
]
@ -329,8 +329,8 @@ export default {
clearInterval(this.time)
},
mounted() {
// this.qlzxdtList = qlzxdtData
this.imgUrl = process.env.VUE_APP_BASE_API3
// this.qlzxdtList = qlzxdtDatas
this.imgUrl = process.env.VUE_APP_BASE_API2
//
this.reportingProcessTimer()
this.zhuanxiangList() //
@ -364,7 +364,7 @@ export default {
for(let i = 0; i < this.qlzxdtList.length; i++){
imgArr = this.qlzxdtList[i].zhuanxiangImg
imgArr = imgArr.split(',')
this.qlzxdtList[i].zhuanxiangImg = imgArr
this.qlzxdtList[i].zhuanxiangImg = this.imgUrl + imgArr[0]
}
},
//

Loading…
Cancel
Save