完成
This commit is contained in:
@@ -14,27 +14,26 @@
|
||||
</template>
|
||||
|
||||
<template #content>
|
||||
<el-form class="ai-form" :rules="rules" ref="form" :model="form" label-width="100px" label-position="right">
|
||||
<el-form size="small" class="ai-form" :rules="rules" ref="form" :model="form" label-width="100px" label-position="right">
|
||||
|
||||
<el-form-item label="发送方式" prop="messageSource" style="width: 50%">
|
||||
<el-form-item label="发送方式" prop="messageSource" style="width: 50%">
|
||||
<el-radio v-model="form.messageSource" label="2">居民群</el-radio>
|
||||
<el-radio v-model="form.messageSource" label="1">居民</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="地区选择" style="width: 100%">
|
||||
<ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" multiple size="small" placeholder="全部地区"/>
|
||||
<ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" multiple size="small" placeholder="全部地区"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="选择组织" style="width: 100%">
|
||||
<el-input size="small" :value="orgSelect" placeholder="请选择" disabled />
|
||||
<el-button size="small" type="info" class="selectDeptUser">选择组织</el-button>
|
||||
<!-- <ai-wechat-selecter slot="append" refs="addTags" :instance="instance" isChooseUnit isStrictly v-model="orgNameList" @change="getSelectPerson">
|
||||
<el-button size="small" type="info">选择组织</el-button>
|
||||
</ai-wechat-selecter> -->
|
||||
<el-form-item label="发送范围" style="width: 100%">
|
||||
<select-dept-user v-model="form.deptList" v-bind="$props" :source="form.messageSource"/>
|
||||
<!-- <ai-wechat-selecter slot="append" refs="addTags" :instance="instance" isChooseUnit isStrictly v-model="orgNameList" @change="getSelectPerson">
|
||||
<el-button size="small" type="info">选择组织</el-button>
|
||||
</ai-wechat-selecter> -->
|
||||
<!-- </el-input> -->
|
||||
<!-- <ai-table-select nodeName="name" :instance="instance" extra="serialNo" searchKey="name" :action="`/app/wxcp/wxdepartment/listAllByCorp`"
|
||||
@select="organizationSelect" multiple/> -->
|
||||
<!-- v => formData.serialNo = v.map(e=> e.serialNo).toString() -->
|
||||
<!-- v => formData.serialNo = v.map(e=> e.serialNo).toString() -->
|
||||
|
||||
</el-form-item>
|
||||
|
||||
@@ -60,15 +59,18 @@
|
||||
</el-form-item>
|
||||
<!-- 图片 -->
|
||||
<el-form-item label="图片" style="width: 100%">
|
||||
<ai-uploader :instance="instance" isWechat v-model="imgList" multiple acceptType=".jpg,.png,.jpeg" :limit="9" url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
|
||||
<ai-uploader :instance="instance" isWechat v-model="imgList" multiple acceptType=".jpg,.png,.jpeg" :limit="9"
|
||||
url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
|
||||
</el-form-item>
|
||||
<!-- 视频 -->
|
||||
<el-form-item label="视频" style="width: 100%">
|
||||
<ai-uploader :instance="instance" fileType="file" isWechat multiple acceptType=".mp4" v-model="videoList" :limit="9" url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader>
|
||||
<ai-uploader :instance="instance" fileType="file" isWechat multiple acceptType=".mp4" v-model="videoList" :limit="9"
|
||||
url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader>
|
||||
</el-form-item>
|
||||
<!-- 附件 -->
|
||||
<el-form-item label="附件" style="width: 100%">
|
||||
<ai-uploader :instance="instance" fileType="file" isWechat multiple v-model="filesList" :limit="9" url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader>
|
||||
<ai-uploader :instance="instance" fileType="file" isWechat multiple v-model="filesList" :limit="9"
|
||||
url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@@ -126,9 +128,11 @@
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import SelectDeptUser from "./SelectDeptUser";
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
components: {SelectDeptUser},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
@@ -171,9 +175,9 @@ export default {
|
||||
orgSelect: '',
|
||||
orgAllList: [],
|
||||
rules: {
|
||||
content: [{ required: true, message: '请输入群发内容'}],
|
||||
messageSource: [{ required: true, message: '请选择群发方式' }],
|
||||
sendTime: [{ required: true, message: '请选择群发时间' }],
|
||||
content: [{required: true, message: '请输入群发内容'}],
|
||||
messageSource: [{required: true, message: '请选择群发方式'}],
|
||||
sendTime: [{required: true, message: '请选择群发时间'}],
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -181,7 +185,7 @@ export default {
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
tagsChange() {
|
||||
if(this.tags?.length) {
|
||||
if (this.tags?.length) {
|
||||
return this.form.tag = this.tags.toString();
|
||||
}
|
||||
},
|
||||
@@ -220,10 +224,10 @@ export default {
|
||||
},
|
||||
getSelectPerson(val) {
|
||||
console.log(val);
|
||||
this.orgNameList = val?.map(item=> item.name)
|
||||
this.orgIdList = val?.map(e=> e.id).toString();
|
||||
this.orgNameList = val?.map(item => item.name)
|
||||
this.orgIdList = val?.map(e => e.id).toString();
|
||||
// this.orgAllList = val
|
||||
this.form.deptList = val?.map(o=>{
|
||||
this.form.deptList = val?.map(o => {
|
||||
return {
|
||||
corpId: o.corpId,
|
||||
// objList: ,
|
||||
@@ -236,7 +240,7 @@ export default {
|
||||
console.log(value);
|
||||
},
|
||||
// 标签
|
||||
getSubTags () {
|
||||
getSubTags() {
|
||||
this.instance.post(`/app/wxcp/wxgroupchattag/listAllByCorp?dvcpId=${this.orgIdList}`).then(res => {
|
||||
if (res?.data) {
|
||||
console.log(res);
|
||||
@@ -411,31 +415,34 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tags {
|
||||
// padding: 10px;
|
||||
.tag_title {
|
||||
font-weight: 600;
|
||||
.tags {
|
||||
// padding: 10px;
|
||||
.tag_title {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tag_item {
|
||||
margin: 5px 0;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
// padding: 5px 10px;
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #DDD;
|
||||
color: #333;
|
||||
border-radius: 4px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.tag_item {
|
||||
margin: 5px 0;
|
||||
span {
|
||||
display: inline-block;
|
||||
// padding: 5px 10px;
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #DDD;
|
||||
color: #333;
|
||||
border-radius: 4px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.active {
|
||||
background: #53bcea;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: #53bcea;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user