Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into dev
This commit is contained in:
@@ -36,13 +36,13 @@
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="发送内容" prop="departmentName" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]">
|
||||
<el-input size="small" type="textarea" :rows="6" placeholder="请输入文本内容..." v-model="form.departmentName"></el-input>
|
||||
<el-form-item label="发送内容" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]">
|
||||
<el-input size="small" type="textarea" :rows="6" placeholder="请输入文本内容..." v-model="form.content"></el-input>
|
||||
<div class="add">
|
||||
<div class="fileList" v-if="fileList.length">
|
||||
<div class="add-item" v-for="(item, index) in fileList" :key="index">
|
||||
<div class="left">
|
||||
<img :src="mapIcon(item.media.type)" />
|
||||
<img :src="mapIcon(item.msgType)" />
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<i @click="removeFile(index)">删除</i>
|
||||
@@ -67,7 +67,7 @@
|
||||
:limit="9"
|
||||
action="/app/wxcp/upload/uploadFile"
|
||||
accept=".jpg,.png,.jpeg"
|
||||
:http-request="v => submitUpload(v, 'image')">
|
||||
:http-request="v => submitUpload(v, '1')">
|
||||
<div class="content-item" trigger>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png" />
|
||||
<p>图片</p>
|
||||
@@ -82,17 +82,28 @@
|
||||
:limit="9"
|
||||
action="/app/wxcp/upload/uploadFile"
|
||||
accept=".mp4"
|
||||
:http-request="v => submitUpload(v, 'video')">
|
||||
:http-request="v => submitUpload(v, '2')">
|
||||
<div class="content-item" trigger>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png" />
|
||||
<p>视频</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div class="content-item">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
multiple
|
||||
:file-list="fileList"
|
||||
:show-file-list="false"
|
||||
:before-upload="v => handleChange(v, 10, '.zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt')"
|
||||
:limit="9"
|
||||
action="/app/wxcp/upload/uploadFile"
|
||||
accept=".zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt"
|
||||
:http-request="v => submitUpload(v, '3')">
|
||||
<div class="content-item" trigger>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/folder.png" />
|
||||
<p>文件</p>
|
||||
</div>
|
||||
<div class="content-item">
|
||||
<p>文件</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div class="content-item" @click="isShowAddLink = true">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/site.png" />
|
||||
<p>网页</p>
|
||||
</div>
|
||||
@@ -133,6 +144,41 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowAddLink"
|
||||
width="920px"
|
||||
title="链接消息"
|
||||
@close="onClose"
|
||||
@onConfirm="onLinkConfirm">
|
||||
<el-form ref="linkForm" :model="linkForm" label-width="110px" label-position="right">
|
||||
<div class="ai-form">
|
||||
<el-form-item label="标题" style="width: 100%;" prop="linkTitle" :rules="[{ required: true, message: '请输入标题', trigger: 'blur' }]">
|
||||
<el-input
|
||||
size="small"
|
||||
placeholder="请输入标题"
|
||||
v-model="linkForm.linkTitle">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="链接" style="width: 100%;" prop="linkUrl" :rules="[{ required: true, message: '请输入链接', trigger: 'blur' }]">
|
||||
<el-input
|
||||
size="small"
|
||||
placeholder="请输入链接"
|
||||
v-model="linkForm.linkUrl">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" style="width: 100%;" prop="linkDesc" :rules="[{ required: true, message: '请输入描述', trigger: 'blur' }]">
|
||||
<el-input
|
||||
size="small"
|
||||
placeholder="请输入描述"
|
||||
v-model="linkForm.linkDesc">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图" prop="linkPicUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传封面图', trigger: 'change' }]">
|
||||
<ai-uploader :instance="instance" v-model="form.linkPicUrl" :limit="1"></ai-uploader>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
@@ -158,9 +204,17 @@
|
||||
info: {},
|
||||
department: [],
|
||||
fileList: [],
|
||||
isShowAddLink: false,
|
||||
linkForm: {
|
||||
linkPicUrl: [],
|
||||
linkDesc: '',
|
||||
linkTitle: '',
|
||||
linkUrl: ''
|
||||
},
|
||||
form: {
|
||||
content: '',
|
||||
choiceTime: '',
|
||||
contents: {},
|
||||
contents: [],
|
||||
enableExamine: '0',
|
||||
examines: [],
|
||||
wxGroups: [],
|
||||
@@ -206,17 +260,38 @@
|
||||
})
|
||||
},
|
||||
|
||||
onLinkConfirm () {
|
||||
this.$refs.linkForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.fileList.push({
|
||||
...this.linkForm,
|
||||
linkPicUrl: this.linkPicUrl[0].url,
|
||||
msgType: '4'
|
||||
})
|
||||
|
||||
this.isShowAddLink = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.linkForm.linkPicUrl = []
|
||||
this.linkForm.linkDesc = ''
|
||||
this.linkForm.linkTitle = ''
|
||||
this.linkForm.linkUrl = ''
|
||||
},
|
||||
|
||||
removeFile (index) {
|
||||
this.fileList.splice(index, 1)
|
||||
},
|
||||
|
||||
mapIcon (type) {
|
||||
return {
|
||||
image: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||||
video: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||||
folder: 'https://cdn.cunwuyun.cn/dvcp/announce/folder.png',
|
||||
site: 'https://cdn.cunwuyun.cn/dvcp/announce/site.png',
|
||||
miniapp: 'https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png'
|
||||
1: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||||
2: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||||
3: 'https://cdn.cunwuyun.cn/dvcp/announce/folder.png',
|
||||
4: 'https://cdn.cunwuyun.cn/dvcp/announce/site.png',
|
||||
5: 'https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png'
|
||||
}[type]
|
||||
},
|
||||
|
||||
@@ -247,16 +322,22 @@
|
||||
},
|
||||
|
||||
submitUpload (file, type) {
|
||||
const fileType = {
|
||||
'1': 'image',
|
||||
'2': 'video',
|
||||
'3': 'file'
|
||||
}[type]
|
||||
let formData = new FormData()
|
||||
formData.append('file', file.file)
|
||||
formData.append('type', type)
|
||||
formData.append('type', fileType)
|
||||
this.instance.post(`/app/wxcp/upload/uploadFile`, formData, {
|
||||
withCredentials: false
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.fileList.push({
|
||||
...res.data.file,
|
||||
media: res.data.media
|
||||
media: res.data.media,
|
||||
msgType: type
|
||||
})
|
||||
|
||||
this.$message.success('上传成功')
|
||||
@@ -282,10 +363,6 @@
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.form.explain = ''
|
||||
},
|
||||
|
||||
confirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.loading = false
|
||||
this.$initWxOpenData()
|
||||
this.$store.dispatch('initOpenData')
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-calendar v-model="calendarDate">
|
||||
<template
|
||||
<template
|
||||
slot="dateCell"
|
||||
slot-scope="{date, data}" >
|
||||
<div class="flex-date">
|
||||
@@ -168,7 +168,7 @@
|
||||
if(this.chooseMonth != month) { // 日历点击不同月
|
||||
this.searchMonth = ''
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.chooseDay = date
|
||||
@@ -181,11 +181,11 @@
|
||||
|
||||
this.chooseMonth = month
|
||||
this.chooseYear = year
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$initWxOpenData()
|
||||
this.$store.dispatch('initOpenData')
|
||||
var year = this.calendarDate.getFullYear();
|
||||
var month = this.calendarDate.getMonth() + 1;
|
||||
var date = this.calendarDate.getDate()
|
||||
@@ -225,7 +225,7 @@
|
||||
if (res.code == 0) {
|
||||
this.dateList = res.data
|
||||
this.getTaskList(this.chooseDay)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getTaskList(day) {
|
||||
@@ -256,7 +256,7 @@
|
||||
this.setLineChart(xData, createData, 'createChart', ['#2891FF'])
|
||||
this.setLineChart(xData, executeData, 'executeChart', ['#FFB865'])
|
||||
this.setLineChart(xData, receiveData, 'receiveChart', ['#26D52B'])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
setLineChart(xData, yData, id, colorList) {
|
||||
@@ -307,9 +307,9 @@
|
||||
if (res.code == 0) {
|
||||
// this.dateList = res.data
|
||||
// this.getTaskList(this.chooseDay)
|
||||
|
||||
|
||||
this.setBarChart()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// var items = [{type: 'departmentName', id: '10', corpid: 'ww596787bb70f08288'}]
|
||||
@@ -319,7 +319,7 @@
|
||||
// }
|
||||
// console.log(data)
|
||||
// })
|
||||
|
||||
|
||||
},
|
||||
setBarChart() {
|
||||
this.departBarChart = echarts.init(document.querySelector(`#departBarChart`))
|
||||
@@ -381,7 +381,7 @@
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// {
|
||||
// tooltip: {
|
||||
// trigger: 'axis',
|
||||
@@ -595,16 +595,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#departBarChart{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
::v-deep .el-calendar-table:not(.is-range) td.next,
|
||||
|
||||
::v-deep .el-calendar-table:not(.is-range) td.next,
|
||||
::v-deep .el-calendar-table:not(.is-range) td.prev {
|
||||
color: #ccc;
|
||||
}
|
||||
@@ -641,7 +641,7 @@
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
::v-deep .el-timeline-item__timestamp.is-top{
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
::v-deep .el-timeline-item__node{
|
||||
|
||||
Reference in New Issue
Block a user