按部门选人
This commit is contained in:
@@ -8,7 +8,11 @@
|
|||||||
<div class="send_scope">
|
<div class="send_scope">
|
||||||
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
||||||
<div @click="toSleectScoped">
|
<div @click="toSleectScoped">
|
||||||
<span>请选择</span><span><u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
|
<span>
|
||||||
|
<span v-if="!form.sendScope">请选择</span>
|
||||||
|
<span v-if="form.sendScope">已选择</span>
|
||||||
|
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -18,7 +22,7 @@
|
|||||||
<div style="color: #3399FF;" @click="preview">预览</div>
|
<div style="color: #3399FF;" @click="preview">预览</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_text">
|
<div class="content_text">
|
||||||
<u-input v-model="content" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" />
|
<u-input v-model="content" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" maxlength="1300"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_fodder">
|
<div class="content_fodder">
|
||||||
<!-- <div style="color: #8E8F91;">添加素材</div> -->
|
<!-- <div style="color: #8E8F91;">添加素材</div> -->
|
||||||
@@ -70,8 +74,10 @@
|
|||||||
|
|
||||||
<div class="file_content" v-for="item in files" :key="item.id">
|
<div class="file_content" v-for="item in files" :key="item.id">
|
||||||
<img class="text_left" src="https://cdn.cunwuyun.cn/dvcp/announce/avatar.png" />
|
<img class="text_left" src="https://cdn.cunwuyun.cn/dvcp/announce/avatar.png" />
|
||||||
<img :src="item.url" alt="" v-if="getExtension(item.name) == '.jpg' || getExtension(item.name) == '.jepg'">
|
<img class="only_pic" :src="item.url" alt="" v-if="getExtension(item.name) == '.jpg' || getExtension(item.name) == '.jpeg'">
|
||||||
<div class="text_right file_right" v-else>
|
<video controls class="only_video" :src="item.url" v-if="getExtension(item.name) == '.mp4'"></video>
|
||||||
|
<div class="text_right file_right"
|
||||||
|
v-if="getExtension(item.name) != '.jpg' && getExtension(item.name) != '.jpeg' && getExtension(item.name) != '.mp4'">
|
||||||
<div class="cont_left">
|
<div class="cont_left">
|
||||||
<h4>{{ item.name }}</h4>
|
<h4>{{ item.name }}</h4>
|
||||||
<p>{{ item.fileSizeStr }}</p>
|
<p>{{ item.fileSizeStr }}</p>
|
||||||
@@ -113,6 +119,7 @@ export default {
|
|||||||
choiceTime: '', // 定时发送时间
|
choiceTime: '', // 定时发送时间
|
||||||
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择
|
||||||
sendType: '0', // 0:立即发送、1:定时发送
|
sendType: '0', // 0:立即发送、1:定时发送
|
||||||
|
wxGroups: [],
|
||||||
},
|
},
|
||||||
enableExamine: false,
|
enableExamine: false,
|
||||||
isTimedTask: false,
|
isTimedTask: false,
|
||||||
@@ -129,7 +136,8 @@ export default {
|
|||||||
minute: true,
|
minute: true,
|
||||||
second: true,
|
second: true,
|
||||||
timestamp: false,
|
timestamp: false,
|
||||||
}
|
},
|
||||||
|
flag: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -177,6 +185,43 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
|
if(this.flag) return
|
||||||
|
|
||||||
|
this.form.contents = [
|
||||||
|
{
|
||||||
|
content: this.content,
|
||||||
|
msgType: '0'
|
||||||
|
},
|
||||||
|
...this.files
|
||||||
|
]
|
||||||
|
|
||||||
|
if(!this.form.contents.length) {
|
||||||
|
return this.$u.toast("请输入发送内容")
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(!this.enableExamine) {
|
||||||
|
// if(!this.form.examines.length) {
|
||||||
|
// return this.$u.toast("请选择审批人")
|
||||||
|
// } else {
|
||||||
|
// this.form.enableExamine = '1'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(!this.isTimedTask) {
|
||||||
|
if(!this.form.choiceTime.length) {
|
||||||
|
return this.$u.toast("请选择发送时间")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form }).then(res=>{
|
||||||
|
this.flag = false
|
||||||
|
if(res?.code ==0) {
|
||||||
|
|
||||||
|
// uni.navigateBack()
|
||||||
|
this.$u.toast("新增成功")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -198,10 +243,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.type = o.index;
|
this.type = o.index;
|
||||||
document.title = this.type==0? "群发居民群": this.type==1? "群发居民": "群发朋友圈"
|
document.title = this.type==0? "群发居民群": this.type==1? "群发居民": "群发朋友圈"
|
||||||
|
uni.$on('checkedScope', res => {
|
||||||
|
this.form.sendScope = res.sendScope
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -324,6 +373,15 @@ export default {
|
|||||||
width: 84px;
|
width: 84px;
|
||||||
height: 84px;
|
height: 84px;
|
||||||
}
|
}
|
||||||
|
.only_pic {
|
||||||
|
max-width: 206px;
|
||||||
|
max-height: 200px;
|
||||||
|
}
|
||||||
|
.only_video {
|
||||||
|
max-width: 284px;
|
||||||
|
max-height: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
.text_right {
|
.text_right {
|
||||||
width: calc(100% - 116px);
|
width: calc(100% - 116px);
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapActions } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: "scopedSelect",
|
name: "scopedSelect",
|
||||||
data() {
|
data() {
|
||||||
@@ -58,12 +59,36 @@ export default {
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
sex: "0",
|
sex: "0",
|
||||||
|
userList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(['selectEnterpriseContact']),
|
||||||
// 选人
|
// 选人
|
||||||
selectUser() {
|
selectUser() {
|
||||||
uni.navigateTo({url: `./selectGridMember`})
|
if(this.type == "1") { // 部门
|
||||||
|
this.getDeptUser()
|
||||||
|
} else if(this.type == "2") { // 网格
|
||||||
|
uni.navigateTo({url: `./selectGridMember`})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getDeptUser() {
|
||||||
|
this.selectEnterpriseContact({
|
||||||
|
fromDepartmentId: 0,
|
||||||
|
mode: "multi",
|
||||||
|
type: ["user"],
|
||||||
|
// selectedDepartmentIds: this.departList?.map(e => e.id)
|
||||||
|
selectedUserIds: this.userList?.map(e => e.id)
|
||||||
|
}).then((res)=>{
|
||||||
|
console.log(res);
|
||||||
|
// if(res?.departmentList) {
|
||||||
|
// this.departmentId = res.departmentList[0].id
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
).catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toTagsList(e) {
|
toTagsList(e) {
|
||||||
@@ -86,7 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.type = o.type;
|
this.type = o.type;
|
||||||
document.title = this.type == 0? '按部门选择':'按网格选择'
|
document.title = this.type == 1? '按部门选择':'按网格选择'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,28 +28,32 @@ export default {
|
|||||||
return {
|
return {
|
||||||
value: '',
|
value: '',
|
||||||
checkList: [
|
checkList: [
|
||||||
{ name: '全部居民群', checked: true },
|
{ name: '全部居民群', checked: true, value: '0'},
|
||||||
{ name: '按部门选择', checked: false },
|
{ name: '按部门选择', checked: false, value: '1'},
|
||||||
{ name: '按网格选择', checked: false }
|
{ name: '按网格选择', checked: false, value: '2' }
|
||||||
],
|
],
|
||||||
showContent: false,
|
showContent: false,
|
||||||
type: '',
|
type: '',
|
||||||
deptSelect: [],
|
deptSelect: [],
|
||||||
girdSelect: [],
|
girdSelect: [],
|
||||||
|
sendScope: '0',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkBtn(e) {
|
checkBtn(e) {
|
||||||
this.checkList.forEach(v=> v.checked = false)
|
this.checkList.forEach(v=> v.checked = false)
|
||||||
e.checked = true
|
e.checked = true
|
||||||
if(e.name == '按部门选择' || e.name == '按网格选择') {
|
if(e.value == '1' || e.value == '2') {
|
||||||
uni.navigateTo({url: `./scopedSelect?type=0`})
|
uni.navigateTo({url: `./scopedSelect?type=${e.value}`})
|
||||||
} else {
|
|
||||||
uni.navigateTo({url: `./scopedSelect?type=1`})
|
|
||||||
}
|
}
|
||||||
|
this.sendScope = e.value
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
uni.navigateBack()
|
uni.navigateBack({
|
||||||
|
success: () => {
|
||||||
|
uni.$emit("checkedScope",{ sendScope: this.sendScope });
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
|
|||||||
Reference in New Issue
Block a user