|
@@ -78,7 +78,25 @@
|
|
|
:options="targetList"
|
|
:options="targetList"
|
|
|
></a-select>
|
|
></a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
-
|
|
|
|
|
|
|
+ <a-form-item label="指向:" name="appointUserArr" v-if="formData.postType==0">
|
|
|
|
|
+ <!-- <a-select-->
|
|
|
|
|
+ <!-- v-model:value="formData.appointUserArr"-->
|
|
|
|
|
+ <!-- mode="multiple"-->
|
|
|
|
|
+ <!-- show-search-->
|
|
|
|
|
+ <!-- placeholder="请选择"-->
|
|
|
|
|
+ <!-- style="width: 100%"-->
|
|
|
|
|
+ <!-- :options="usertypeOptions"-->
|
|
|
|
|
+ <!-- :filter-option="filterOption"-->
|
|
|
|
|
+ <!-- ></a-select>-->
|
|
|
|
|
+ <!-- @popupScroll="popupScroll" -->
|
|
|
|
|
+ <SelectorList v-model="formData.appointUserArr"
|
|
|
|
|
+ mode="multiple"
|
|
|
|
|
+ :options="usertypeOptions"
|
|
|
|
|
+ :total="userTotal"
|
|
|
|
|
+ @onInit="onInit"
|
|
|
|
|
+ @onChange="onChange"
|
|
|
|
|
+ ></SelectorList>
|
|
|
|
|
+ </a-form-item>
|
|
|
<!-- <a-form-item label="定向用户:" name="appointUserArr">-->
|
|
<!-- <a-form-item label="定向用户:" name="appointUserArr">-->
|
|
|
<!-- <a-select-->
|
|
<!-- <a-select-->
|
|
|
<!-- v-model:value="formData.appointUserArr"-->
|
|
<!-- v-model:value="formData.appointUserArr"-->
|
|
@@ -104,6 +122,7 @@
|
|
|
import forumPostInfoApi from '@/api/forum/forumPostInfoApi'
|
|
import forumPostInfoApi from '@/api/forum/forumPostInfoApi'
|
|
|
import forumApi from '@/api/forum/forumApi'
|
|
import forumApi from '@/api/forum/forumApi'
|
|
|
import XnEditor from '@/components/Editor/index.vue'
|
|
import XnEditor from '@/components/Editor/index.vue'
|
|
|
|
|
+ import SelectorList from '@/components/SelectorList/index.vue'
|
|
|
import Bowser from 'bowser'
|
|
import Bowser from 'bowser'
|
|
|
import {message} from "ant-design-vue";
|
|
import {message} from "ant-design-vue";
|
|
|
// 抽屉状态
|
|
// 抽屉状态
|
|
@@ -112,9 +131,11 @@
|
|
|
const formRef = ref()
|
|
const formRef = ref()
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
const formData = ref({
|
|
const formData = ref({
|
|
|
- contentCorrectionParam:{}
|
|
|
|
|
|
|
+ contentCorrectionParam:{},
|
|
|
|
|
+ appointUserArr : []
|
|
|
})
|
|
})
|
|
|
const submitLoading = ref(false)
|
|
const submitLoading = ref(false)
|
|
|
|
|
+ const userTotal = ref(0)
|
|
|
//分类
|
|
//分类
|
|
|
const typeOptions = ref([])
|
|
const typeOptions = ref([])
|
|
|
//用户
|
|
//用户
|
|
@@ -145,6 +166,9 @@
|
|
|
value: 1
|
|
value: 1
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
|
|
+ const onInit = () =>{
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
//帖子类型
|
|
//帖子类型
|
|
|
const invitationOptions = ref([
|
|
const invitationOptions = ref([
|
|
|
{
|
|
{
|
|
@@ -160,6 +184,10 @@
|
|
|
// value: 2
|
|
// value: 2
|
|
|
// }
|
|
// }
|
|
|
])
|
|
])
|
|
|
|
|
+ const userPagination = ref({
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ current: 1
|
|
|
|
|
+ })
|
|
|
// 打开抽屉
|
|
// 打开抽屉
|
|
|
const onOpen = (record) => {
|
|
const onOpen = (record) => {
|
|
|
visible.value = true
|
|
visible.value = true
|
|
@@ -173,6 +201,7 @@
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
forumApi.allUserList().then((data) => {
|
|
forumApi.allUserList().then((data) => {
|
|
|
|
|
+ userTotal.value = data.total
|
|
|
usertypeOptions.value = data.map((r) => {
|
|
usertypeOptions.value = data.map((r) => {
|
|
|
return {
|
|
return {
|
|
|
label: r.name,
|
|
label: r.name,
|
|
@@ -190,6 +219,25 @@
|
|
|
formData.value = Object.assign({}, recordData)
|
|
formData.value = Object.assign({}, recordData)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ const onChange = ( page, pageSize) =>{
|
|
|
|
|
+ userPagination.value.size = pageSize
|
|
|
|
|
+ userPagination.value.current = page
|
|
|
|
|
+ getUserAllList()
|
|
|
|
|
+ }
|
|
|
|
|
+ const getUserAllList = (add) => {
|
|
|
|
|
+ forumApi.allUserList(userPagination.value).then((res) => {
|
|
|
|
|
+ userTotal.value = res.total
|
|
|
|
|
+ let userList = res.records.map((r) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ label: `${r.name}-${r.eduIdentityName ?? ''}`,
|
|
|
|
|
+ value: r.id,
|
|
|
|
|
+ ...r
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ usertypeOptions.value = add ? [...usertypeOptions.value, ...userList] : userList
|
|
|
|
|
+ console.log('是打开我 我是人员列表',usertypeOptions.value)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
// 关闭抽屉
|
|
// 关闭抽屉
|
|
|
const onClose = () => {
|
|
const onClose = () => {
|
|
|
formRef.value.resetFields()
|
|
formRef.value.resetFields()
|
|
@@ -228,13 +276,16 @@
|
|
|
if (formData.value.postType == 1) {
|
|
if (formData.value.postType == 1) {
|
|
|
formData.value = Object.assign(formData.value, browserObj.value)
|
|
formData.value = Object.assign(formData.value, browserObj.value)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (formData.value.appointUserArr && formData.value.appointUserArr.length > 1) {
|
|
|
|
|
+ formData.value.appointUser = formData.value.appointUserArr.join(',')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const formDataParam = cloneDeep(formData.value)
|
|
const formDataParam = cloneDeep(formData.value)
|
|
|
forumPostInfoApi
|
|
forumPostInfoApi
|
|
|
.forumPostInfoSubmitForm(formDataParam, formDataParam.postId)
|
|
.forumPostInfoSubmitForm(formDataParam, formDataParam.postId)
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- if (formData.value.appointUserArr && formData.value.appointUserArr.length > 1) {
|
|
|
|
|
- formData.value.appointUser = formData.value.appointUserArr.join(',')
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
onClose()
|
|
onClose()
|
|
|
emit('successful')
|
|
emit('successful')
|
|
|
})
|
|
})
|
|
@@ -251,6 +302,7 @@
|
|
|
}
|
|
}
|
|
|
if (event == 1) {
|
|
if (event == 1) {
|
|
|
getBower()
|
|
getBower()
|
|
|
|
|
+ formData.value.appointUserArr = []
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const targetList = ref([])
|
|
const targetList = ref([])
|