协同宣发

This commit is contained in:
shijingjing
2022-08-31 13:43:21 +08:00
parent 1c77940784
commit 5d4c349863
2 changed files with 56 additions and 10 deletions

View File

@@ -21,9 +21,10 @@
<u-input v-model="value" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" /> <u-input v-model="value" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" />
</div> </div>
<div class="content_fodder"> <div class="content_fodder">
<div style="color: #8E8F91;">添加素材</div> <!-- <div style="color: #8E8F91;">添加素材</div> -->
<div class="fodder_alls"> <div class="fodder_alls">
<div class="fodder_add"><u-icon name="plus" color="#CCD0D3" size="32"></u-icon></div> <!-- <div class="fodder_add"><u-icon name="plus" color="#CCD0D3" size="32"></u-icon></div> -->
<AiUploader v-model="form.files" placeholder="添加素材" type="file" :limit="9" multiple action="/admin/file/add2"></AiUploader>
</div> </div>
</div> </div>
</div> </div>
@@ -33,10 +34,13 @@
<div>宣发需要审批</div> <div>宣发需要审批</div>
<u-switch v-model="checked" size="40" @change="checked = !!checked"></u-switch> <u-switch v-model="checked" size="40" @change="checked = !!checked"></u-switch>
</div> </div>
<div class="examine_person" v-if="checked == true"> <div class="examine_person" v-if="checked == true" @click="getDeptUser">
<div><span class="color_red">*</span><span class="title">审批人</span></div> <div><span class="color_red">*</span><span class="title">审批人</span></div>
<div> <div>
<span>请选择人员</span><span><u-icon name="arrow-right" color="#CCD0D3"></u-icon></span> <span v-if="userList.length">请选择人员</span><span><u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<div v-if="!userList.length">
<AiOpenData type="departmentName" :openid="departmentId"/>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -49,6 +53,7 @@
</template> </template>
<script> <script>
import { mapActions } from "vuex";
export default { export default {
name: "addPropaganda", name: "addPropaganda",
data() { data() {
@@ -56,11 +61,32 @@ export default {
type: '', type: '',
value: '', value: '',
checked: false, checked: false,
form: {
files: []
},
userList: [],
} }
}, },
methods: { methods: {
...mapActions(['selectEnterpriseContact']),
toSleectScoped() { toSleectScoped() {
uni.navigateTo({url: `./sendScoped?type=${this.type}`}) uni.navigateTo({url: `./sendScoped?type=${this.type}`})
},
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)=>{
// if(res?.departmentList) {
// this.departmentId = res.departmentList[0].id
// }
}
).catch((err) => {
console.log(err);
})
} }
}, },
onShow() { onShow() {

View File

@@ -1,9 +1,12 @@
<template> <template>
<div class="sendScoped"> <div class="sendScoped">
<div class="item" v-for="(item,index) in checkList" :key="index" @click="checkBtn(item)">
<div>{{ item.name }}</div>
<icon type="circle" size="18"/> <div>
<icon type="success" size="16"/> <icon type="success" size="16" v-if="item.checked"/>
<icon type="circle" size="18" v-else />
</div>
</div>
<div class="btn"> <div class="btn">
<div class="cancelBtn">取消</div> <div class="cancelBtn">取消</div>
@@ -17,11 +20,21 @@ export default {
name: 'sendScoped', name: 'sendScoped',
data() { data() {
return { return {
value: '',
checkList: [
{ name: '全部居民群', checked: false },
{ name: '按部门选择', checked: false },
{ name: '按网格选择', checked: false }
],
checked: true
} }
}, },
methods: { methods: {
checkBtn(e) {
// console.log(e);
this.checkList.forEach(v=> v.checked = false)
e.checked = true
}
}, },
onLoad(o) { onLoad(o) {
console.log(o); console.log(o);
@@ -33,7 +46,14 @@ export default {
.sendScoped { .sendScoped {
background: #FFF; background: #FFF;
.item {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #DDD;
padding: 26px 32px;
box-sizing: border-box;
}
.btn { .btn {