BUG 30759
This commit is contained in:
@@ -20,7 +20,8 @@
|
|||||||
<el-radio label="2">按网格选择</el-radio>
|
<el-radio label="2">按网格选择</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择群主" v-if="form.sendScope !== '0'" prop="wxGroupsName" style="width: 100%;" :rules="[{ required: true, message: '请选择选择群主', trigger: 'change' }]">
|
<el-form-item label="选择群主" v-if="form.sendScope !== '0'" prop="wxGroupsName" style="width: 100%;"
|
||||||
|
:rules="[{ required: true, message: '请选择选择群主', trigger: 'change' }]">
|
||||||
<div class="AppAnnounceDetail-select">
|
<div class="AppAnnounceDetail-select">
|
||||||
<el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input>
|
<el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input>
|
||||||
<div class="select-left" v-if="form.wxGroups.length">
|
<div class="select-left" v-if="form.wxGroups.length">
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
<div class="fileList" v-if="fileList.length">
|
<div class="fileList" v-if="fileList.length">
|
||||||
<div class="add-item" v-for="(item, index) in fileList" :key="index">
|
<div class="add-item" v-for="(item, index) in fileList" :key="index">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img :src="mapIcon(item.msgType)" />
|
<img :src="mapIcon(item.msgType)"/>
|
||||||
<span>{{ item.mpTitle || item.name || item.linkTitle }}</span>
|
<span>{{ item.mpTitle || item.name || item.linkTitle }}</span>
|
||||||
</div>
|
</div>
|
||||||
<i @click="removeFile(index)">删除</i>
|
<i @click="removeFile(index)">删除</i>
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
offset="0"
|
offset="0"
|
||||||
trigger="hover">
|
trigger="hover">
|
||||||
<div class="add-item" slot="reference" style="width: max-content;">
|
<div class="add-item" slot="reference" style="width: max-content;">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/add.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/add.png"/>
|
||||||
<span style="color: #2266FF; font-size: 12px;">添加附件类型</span>
|
<span style="color: #2266FF; font-size: 12px;">添加附件类型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="AppAnnounceDetail-content-wrapper">
|
<div class="AppAnnounceDetail-content-wrapper">
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
:on-exceed="onExceed"
|
:on-exceed="onExceed"
|
||||||
:http-request="v => submitUpload(v, '1')">
|
:http-request="v => submitUpload(v, '1')">
|
||||||
<div class="content-item" trigger>
|
<div class="content-item" trigger>
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png"/>
|
||||||
<p>图片</p>
|
<p>图片</p>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -100,7 +101,7 @@
|
|||||||
:on-exceed="onExceed"
|
:on-exceed="onExceed"
|
||||||
:http-request="v => submitUpload(v, '2')">
|
:http-request="v => submitUpload(v, '2')">
|
||||||
<div class="content-item" trigger>
|
<div class="content-item" trigger>
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png"/>
|
||||||
<p>视频</p>
|
<p>视频</p>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -116,16 +117,16 @@
|
|||||||
accept=".zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt"
|
accept=".zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt"
|
||||||
:http-request="v => submitUpload(v, '3')">
|
:http-request="v => submitUpload(v, '3')">
|
||||||
<div class="content-item" trigger>
|
<div class="content-item" trigger>
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/folder.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/folder.png"/>
|
||||||
<p>文件</p>
|
<p>文件</p>
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="content-item" @click="isShowAddLink = true">
|
<div class="content-item" @click="isShowAddLink = true">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/site.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/site.png"/>
|
||||||
<p>网页</p>
|
<p>网页</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-item" @click="isShowAddMiniapp = true">
|
<div class="content-item" @click="isShowAddMiniapp = true">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png" />
|
<img src="https://cdn.cunwuyun.cn/dvcp/announce/miniapp.png"/>
|
||||||
<p>小程序</p>
|
<p>小程序</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -143,9 +144,10 @@
|
|||||||
active-text="开启后,创建的群发任务需要审批人进行审批">
|
active-text="开启后,创建的群发任务需要审批人进行审批">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.enableExamine === '1'" label="审批人员" prop="examines" style="width: 100%;" :rules="[{ required: true, message: '请选择审批人员', trigger: 'change' }]">
|
<el-form-item v-if="form.enableExamine === '1'" label="审批人员" prop="examines" style="width: 100%;"
|
||||||
|
:rules="[{ required: true, message: '请选择审批人员', trigger: 'change' }]">
|
||||||
<div class="AppAnnounceDetail-select">
|
<div class="AppAnnounceDetail-select">
|
||||||
<el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName"> </el-input>
|
<el-input class="AppAnnounceDetail-select__input" size="small" placeholder="请选择..." v-model="form.examinesName"></el-input>
|
||||||
<div class="select-left" v-if="form.examines.length">
|
<div class="select-left" v-if="form.examines.length">
|
||||||
<span v-for="(item, index) in form.examines" :key="index">
|
<span v-for="(item, index) in form.examines" :key="index">
|
||||||
<ai-open-data type="userName" :openid="item.wxOpenUserId"></ai-open-data>
|
<ai-open-data type="userName" :openid="item.wxOpenUserId"></ai-open-data>
|
||||||
@@ -270,9 +272,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Phone from './Phone'
|
import Phone from './Phone'
|
||||||
import { mapActions, mapState } from 'vuex'
|
import {mapActions, mapState} from 'vuex'
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@@ -285,7 +288,7 @@
|
|||||||
Phone
|
Phone
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
department: [],
|
department: [],
|
||||||
@@ -340,7 +343,7 @@
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
|
|
||||||
groupLen () {
|
groupLen() {
|
||||||
let i = 0
|
let i = 0
|
||||||
this.form.wxGroups.forEach(v => {
|
this.form.wxGroups.forEach(v => {
|
||||||
i = i + v.groupIds.split(',').length
|
i = i + v.groupIds.split(',').length
|
||||||
@@ -350,7 +353,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {
|
||||||
if (this.params && this.params.id) {
|
if (this.params && this.params.id) {
|
||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
this.getInfo(this.params.id)
|
this.getInfo(this.params.id)
|
||||||
@@ -362,7 +365,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
...mapActions(['initOpenData', 'transCanvas']),
|
...mapActions(['initOpenData', 'transCanvas']),
|
||||||
|
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -406,7 +409,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onUserChange (e) {
|
onUserChange(e) {
|
||||||
if (e.length) {
|
if (e.length) {
|
||||||
this.form.examinesName = '1'
|
this.form.examinesName = '1'
|
||||||
} else {
|
} else {
|
||||||
@@ -414,7 +417,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onScopeChange (e) {
|
onScopeChange(e) {
|
||||||
this.form.filterCriteria = []
|
this.form.filterCriteria = []
|
||||||
this.form.wxGroups = []
|
this.form.wxGroups = []
|
||||||
this.girdNames = ''
|
this.girdNames = ''
|
||||||
@@ -426,13 +429,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onPick (e) {
|
onPick(e) {
|
||||||
if (this.form.sendScope === '2' && e.length) {
|
if (this.form.sendScope === '2' && e.length) {
|
||||||
this.girdNames = e.map(v => v.girdName)
|
this.girdNames = e.map(v => v.girdName)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelcetChange (e) {
|
onSelcetChange(e) {
|
||||||
if (e.length) {
|
if (e.length) {
|
||||||
this.form.wxGroupsName = '1'
|
this.form.wxGroupsName = '1'
|
||||||
|
|
||||||
@@ -445,7 +448,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getWxGroups () {
|
getWxGroups() {
|
||||||
this.instance.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.form.sendScope}`, null, {
|
this.instance.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.form.sendScope}`, null, {
|
||||||
data: {
|
data: {
|
||||||
filterCriteria: this.form.filterCriteria.join(',')
|
filterCriteria: this.form.filterCriteria.join(',')
|
||||||
@@ -461,7 +464,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onLinkConfirm () {
|
onLinkConfirm() {
|
||||||
this.$refs.linkForm.validate((valid) => {
|
this.$refs.linkForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
@@ -475,7 +478,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onMiniAppForm () {
|
onMiniAppForm() {
|
||||||
this.$refs.miniAppForm.validate((valid) => {
|
this.$refs.miniAppForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
@@ -491,7 +494,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose () {
|
onClose() {
|
||||||
this.linkForm.linkPicUrl = []
|
this.linkForm.linkPicUrl = []
|
||||||
this.linkForm.linkDesc = ''
|
this.linkForm.linkDesc = ''
|
||||||
this.linkForm.linkTitle = ''
|
this.linkForm.linkTitle = ''
|
||||||
@@ -504,11 +507,11 @@
|
|||||||
this.isShowDate = false
|
this.isShowDate = false
|
||||||
},
|
},
|
||||||
|
|
||||||
removeFile (index) {
|
removeFile(index) {
|
||||||
this.fileList.splice(index, 1)
|
this.fileList.splice(index, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
mapIcon (type) {
|
mapIcon(type) {
|
||||||
return {
|
return {
|
||||||
1: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
1: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png',
|
||||||
2: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
2: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png',
|
||||||
@@ -526,7 +529,7 @@
|
|||||||
return name.substring(name.lastIndexOf('.'))
|
return name.substring(name.lastIndexOf('.'))
|
||||||
},
|
},
|
||||||
|
|
||||||
handleChange (e, size, accept) {
|
handleChange(e, size, accept) {
|
||||||
const isLt10M = e.size / 1024 / 1024 < size
|
const isLt10M = e.size / 1024 / 1024 < size
|
||||||
const suffixName = this.getExtension(e.name)
|
const suffixName = this.getExtension(e.name)
|
||||||
const suffixNameList = accept.split(',')
|
const suffixNameList = accept.split(',')
|
||||||
@@ -544,11 +547,11 @@
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
|
||||||
onExceed () {
|
onExceed() {
|
||||||
this.$message.error(`最多上传9个附件`)
|
this.$message.error(`最多上传9个附件`)
|
||||||
},
|
},
|
||||||
|
|
||||||
submitUpload (file, type) {
|
submitUpload(file, type) {
|
||||||
const fileType = {
|
const fileType = {
|
||||||
'1': 'image',
|
'1': 'image',
|
||||||
'2': 'video',
|
'2': 'video',
|
||||||
@@ -557,6 +560,7 @@
|
|||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('file', file.file)
|
formData.append('file', file.file)
|
||||||
formData.append('type', fileType)
|
formData.append('type', fileType)
|
||||||
|
let loading = this.$loading()
|
||||||
this.instance.post(`/app/wxcp/upload/uploadFile`, formData, {
|
this.instance.post(`/app/wxcp/upload/uploadFile`, formData, {
|
||||||
withCredentials: false
|
withCredentials: false
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -572,10 +576,10 @@
|
|||||||
|
|
||||||
this.$message.success('上传成功')
|
this.$message.success('上传成功')
|
||||||
}
|
}
|
||||||
})
|
}).finally(() => loading.close())
|
||||||
},
|
},
|
||||||
|
|
||||||
onDateForm () {
|
onDateForm() {
|
||||||
this.$refs.dateForm.validate((valid) => {
|
this.$refs.dateForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (new Date(this.dateForm.choiceTime).getTime() < Date.now()) {
|
if (new Date(this.dateForm.choiceTime).getTime() < Date.now()) {
|
||||||
@@ -587,7 +591,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm (sendType) {
|
confirm(sendType) {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.form.wxGroups.length) {
|
if (!this.form.wxGroups.length) {
|
||||||
@@ -645,18 +649,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel (isRefresh) {
|
cancel(isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
isRefresh: !!isRefresh
|
isRefresh: !!isRefresh
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.AppAnnounceDetail-content-wrapper {
|
.AppAnnounceDetail-content-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
@@ -693,9 +697,9 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.AppAnnounceAdd {
|
.AppAnnounceAdd {
|
||||||
.ai-detail__content {
|
.ai-detail__content {
|
||||||
.ai-detail__content--wrapper {
|
.ai-detail__content--wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -878,5 +882,5 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user