Commit 9cf74068 by 怪兽?别跑

员工动态接口传参调整

1 parent f1303fa8
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
type="daterange" type="daterange"
range-separator="——" range-separator="——"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker> end-placeholder="结束日期"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label-width="0"> <el-form-item label-width="0">
<!-- v-hasPermi="['wecom:code:list']" --> <!-- v-hasPermi="['wecom:code:list']" -->
...@@ -37,11 +38,13 @@ ...@@ -37,11 +38,13 @@
:src="row.content" :src="row.content"
fit="fit" fit="fit"
:preview-src-list="[row.content]" :preview-src-list="[row.content]"
style="width: 100px; height: 100px"></el-image> style="width: 100px; height: 100px;"
></el-image>
<video <video
v-else-if="row.contentType === 'video'" v-else-if="row.contentType === 'video'"
style="width: 100px; height: 100px" style="width: 100px; height: 100px;"
:src="row.content"></video> :src="row.content"
></video>
<div v-else>{{ row.content }}</div> <div v-else>{{ row.content }}</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -67,7 +70,7 @@ ...@@ -67,7 +70,7 @@
<el-table-column show-overflow-tooltip prop="commentNum" label="评论数"></el-table-column> <el-table-column show-overflow-tooltip prop="commentNum" label="评论数"></el-table-column>
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="detailFn(row.momentId)">详情</el-button> <el-button type="text" @click="detailFn(row.id)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -78,7 +81,8 @@ ...@@ -78,7 +81,8 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
title="组织架构" title="组织架构"
:defaultValues="userArray" :defaultValues="userArray"
@success="getSelectUser"></SelectUser> @success="getSelectUser"
></SelectUser>
<el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%"> <el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%">
<el-form label-position="right" label-width="100px"> <el-form label-position="right" label-width="100px">
<template v-for="(data, index) in detail.otherContent"> <template v-for="(data, index) in detail.otherContent">
...@@ -86,13 +90,13 @@ ...@@ -86,13 +90,13 @@
{{ data.other }} {{ data.other }}
</el-form-item> </el-form-item>
<el-form-item :key="index" label=" " v-if="data.annexType === 'video'"> <el-form-item :key="index" label=" " v-if="data.annexType === 'video'">
<div style="display: inline-block; margin-right: 10px"> <div style="display: inline-block; margin-right: 10px;">
<video style="width: 200px; height: 200px" :src="data.annexUrl" controls></video> <video style="width: 200px; height: 200px;" :src="data.annexUrl" controls></video>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :key="index" label=" " v-if="data.annexType === 'link'"> <el-form-item :key="index" label=" " v-if="data.annexType === 'link'">
<div style="display: inline-block; margin-right: 10px"> <div style="display: inline-block; margin-right: 10px;">
<span style="width: 100px; height: 100px">{{ data.annexUrl }}</span> <span style="width: 100px; height: 100px;">{{ data.annexUrl }}</span>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
...@@ -101,10 +105,11 @@ ...@@ -101,10 +105,11 @@
<div v-for="(data, index) in detail.otherContent"> <div v-for="(data, index) in detail.otherContent">
<el-image <el-image
class="item" class="item"
style="width: 100px; height: 100px" style="width: 100px; height: 100px;"
:preview-src-list="[data.annexUrl]" :preview-src-list="[data.annexUrl]"
v-if="data.annexType === 'image'" v-if="data.annexType === 'image'"
:src="data.annexUrl"></el-image> :src="data.annexUrl"
></el-image>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -123,137 +128,137 @@ ...@@ -123,137 +128,137 @@
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle' import { getEnterpriceList, syncHMoments, getDetail } from '@/api/circle'
export default { export default {
name: 'friend-index', name: 'friend-index',
components: {}, components: {},
data() { data() {
return { return {
// disable: false, // disable: false,
value1: [], value1: [],
dialogVisible: false, dialogVisible: false,
userArray: [], userArray: [],
name: '', name: '',
query: { query: {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
beginTime: '', beginTime: '',
endTime: '', endTime: '',
creator: '', creator: '',
type: 1, type: 1
}, },
loading: false, loading: false,
tableData: [], tableData: [],
total: 0, total: 0,
lastSyncTime: '', lastSyncTime: '',
detailDialogVisible: false, detailDialogVisible: false,
detail: {}, detail: {}
}
},
methods: {
setTimeChange(e) {
if (e) {
this.query.beginTime = moment(e[0]).format('YYYY-MM-DD')
this.query.endTime = moment(e[1]).format('YYYY-MM-DD')
} else {
this.query.beginTime = ''
this.query.endTime = ''
} }
}, },
detailFn(id) { methods: {
this.detailDialogVisible = true setTimeChange(e) {
getDetail(id).then((dd) => { if (e) {
if (dd.code === 200) { this.query.beginTime = moment(e[0]).format('YYYY-MM-DD')
this.detail = dd.data this.query.endTime = moment(e[1]).format('YYYY-MM-DD')
} } else {
}) this.query.beginTime = ''
}, this.query.endTime = ''
syncFn() {
syncHMoments({ filterType: 1 }).then((res) => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.getList(1)
} }
}) },
}, detailFn(id) {
getSelectUser(data) { this.detailDialogVisible = true
this.userArray = data getDetail(id).then((dd) => {
this.query.creator = this.userArray if (dd.code === 200) {
.map(function (obj, index) { this.detail = dd.data
return obj.userId }
})
.join(',')
this.name = this.userArray
.map(function (obj, index) {
return obj.name
})
.join(',')
},
resetQuery() {
this.name = ''
;(this.query = {
pageSize: 10,
pageNum: 1,
beginTime: '',
endTime: '',
creator: '',
type: 1,
}),
(this.userArray = [])
this.value1 = []
this.getList(1)
},
getList(type) {
type && (this.query.pageNum = type)
this.loading = true
getEnterpriceList(this.query)
.then((res) => {
this.tableData = res.rows
this.lastSyncTime = res.lastSyncTime
// this.setTimeDiff()
this.total = Number(res.total)
this.loading = false
}) })
.catch(() => { },
this.loading = false syncFn() {
syncHMoments({ filterType: 1 }).then((res) => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.getList(1)
}
}) })
},
getSelectUser(data) {
this.userArray = data
this.query.creator = this.userArray
.map(function (obj, index) {
return obj.userId
})
.join(',')
this.name = this.userArray
.map(function (obj, index) {
return obj.name
})
.join(',')
},
resetQuery() {
this.name = ''
;(this.query = {
pageSize: 10,
pageNum: 1,
beginTime: '',
endTime: '',
creator: '',
type: 1
}),
(this.userArray = [])
this.value1 = []
this.getList(1)
},
getList(type) {
type && (this.query.pageNum = type)
this.loading = true
getEnterpriceList(this.query)
.then((res) => {
this.tableData = res.rows
this.lastSyncTime = res.lastSyncTime
// this.setTimeDiff()
this.total = Number(res.total)
this.loading = false
})
.catch(() => {
this.loading = false
})
}
// setTimeDiff() {
// if (this.lastSyncTime) {
// let date1 = moment(this.lastSyncTime)
// let date2 = moment()
// let date3 = date2.diff(date1, 'minute')
// const h = Math.floor(date3 / 60)
// console.log(h)
// if (h >= 2) {
// this.disable = false
// } else {
// this.disable = true
// }
// }
// }
}, },
// setTimeDiff() { mounted() {},
// if (this.lastSyncTime) { created() {
// let date1 = moment(this.lastSyncTime) this.value1[1] = moment(new Date()).format('YYYY-MM-DD')
// let date2 = moment() this.value1[0] = moment(new Date()).subtract(1, 'months').format('YYYY-MM-DD')
// let date3 = date2.diff(date1, 'minute') this.query.beginTime = moment(this.value1[0]).format('YYYY-MM-DD')
// const h = Math.floor(date3 / 60) this.query.endTime = moment(this.value1[1]).format('YYYY-MM-DD')
// console.log(h) this.getList()
// if (h >= 2) { }
// this.disable = false }
// } else {
// this.disable = true
// }
// }
// }
},
mounted() {},
created() {
this.value1[1] = moment(new Date()).format('YYYY-MM-DD')
this.value1[0] = moment(new Date()).subtract(1, 'months').format('YYYY-MM-DD')
this.query.beginTime = moment(this.value1[0]).format('YYYY-MM-DD')
this.query.endTime = moment(this.value1[1]).format('YYYY-MM-DD')
this.getList()
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.img_list { .img_list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: 330px; width: 330px;
.item { .item {
flex: 1; flex: 1;
width: 110px; width: 110px;
height: 100px; height: 100px;
margin-right: 5px; margin-right: 5px;
}
} }
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!