|
@@ -36,16 +36,23 @@
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
<a-col :span="8">
|
|
|
<a-form-item label="指向:" name="appointUserArr">
|
|
<a-form-item label="指向:" name="appointUserArr">
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="formData.appointUserArr"
|
|
|
|
|
- mode="multiple"
|
|
|
|
|
- show-search
|
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- :options="usertypeOptions"
|
|
|
|
|
- :filter-option="filterOption"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+<!-- <a-select-->
|
|
|
|
|
+<!-- v-model:value="formData.appointUserArr"-->
|
|
|
|
|
+<!-- mode="multiple"-->
|
|
|
|
|
+<!-- show-search-->
|
|
|
|
|
+<!-- placeholder="请选择"-->
|
|
|
|
|
+<!-- style="width: 100%"-->
|
|
|
|
|
+<!-- :options="usertypeOptions"-->
|
|
|
|
|
+<!-- :filter-option="filterOption"-->
|
|
|
|
|
+<!-- ></a-select>-->
|
|
|
<!-- @popupScroll="popupScroll" -->
|
|
<!-- @popupScroll="popupScroll" -->
|
|
|
|
|
+ <SelectorList v-model="formData.appointUserArr"
|
|
|
|
|
+ mode="multiple"
|
|
|
|
|
+ :options="usertypeOptions"
|
|
|
|
|
+ :total="userTotal"
|
|
|
|
|
+ @onInit="onInit"
|
|
|
|
|
+ @onChange="onChange"
|
|
|
|
|
+ ></SelectorList>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
@@ -68,6 +75,7 @@
|
|
|
import tool from '@/utils/tool'
|
|
import tool from '@/utils/tool'
|
|
|
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'
|
|
|
const userInfo = tool.data.get('USER_INFO')
|
|
const userInfo = tool.data.get('USER_INFO')
|
|
|
const typeOptions = ref([])
|
|
const typeOptions = ref([])
|
|
|
// 默认是关闭状态
|
|
// 默认是关闭状态
|
|
@@ -77,8 +85,13 @@
|
|
|
const treeData = ref([])
|
|
const treeData = ref([])
|
|
|
// 表单数据,也就是默认给一些数据
|
|
// 表单数据,也就是默认给一些数据
|
|
|
const formData = ref({
|
|
const formData = ref({
|
|
|
- postType: 0
|
|
|
|
|
|
|
+ postType: 0,
|
|
|
|
|
+ appointUserArr : []
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ watch(() => formData.value.appointUserArr, (newVal) => {
|
|
|
|
|
+ console.log('等眼看着外面:', newVal);
|
|
|
|
|
+ }, { deep: true });
|
|
|
// 默认展开的节点(顶级)
|
|
// 默认展开的节点(顶级)
|
|
|
const defaultExpandedKeys = ref([0])
|
|
const defaultExpandedKeys = ref([0])
|
|
|
const submitLoading = ref(false)
|
|
const submitLoading = ref(false)
|
|
@@ -89,7 +102,7 @@
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
}
|
|
}
|
|
|
const userPagination = ref({
|
|
const userPagination = ref({
|
|
|
- size: 99999999,
|
|
|
|
|
|
|
+ size: 10,
|
|
|
current: 1
|
|
current: 1
|
|
|
})
|
|
})
|
|
|
const userTotal = ref(0)
|
|
const userTotal = ref(0)
|
|
@@ -105,6 +118,7 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
usertypeOptions.value = add ? [...usertypeOptions.value, ...userList] : userList
|
|
usertypeOptions.value = add ? [...usertypeOptions.value, ...userList] : userList
|
|
|
|
|
+ console.log('是打开我 我是人员列表',usertypeOptions.value)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
const popupScroll = (el) => {
|
|
const popupScroll = (el) => {
|
|
@@ -116,6 +130,15 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ const onInit = () =>{
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ const onChange = ( page, pageSize) =>{
|
|
|
|
|
+ userPagination.value.size = pageSize
|
|
|
|
|
+ userPagination.value.current = page
|
|
|
|
|
+ getUserAllList()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 打开抽屉
|
|
// 打开抽屉
|
|
|
const onOpen = (record, module) => {
|
|
const onOpen = (record, module) => {
|
|
|
moduleId.value = module
|
|
moduleId.value = module
|
|
@@ -129,12 +152,14 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
+ console.log('是打开我',record, module)
|
|
|
getUserAllList()
|
|
getUserAllList()
|
|
|
if (module) {
|
|
if (module) {
|
|
|
- if (record?.appointUser) {
|
|
|
|
|
- record.appointUserArr = record.appointUser.split(',')
|
|
|
|
|
|
|
+ if (record?.appointUserId) {
|
|
|
|
|
+ record.appointUserArr = record.appointUserId.split(',')
|
|
|
}
|
|
}
|
|
|
formData.value = Object.assign(formData.value, record)
|
|
formData.value = Object.assign(formData.value, record)
|
|
|
|
|
+ console.log('是打开我 要去放进去',formData.value)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 关闭抽屉
|
|
// 关闭抽屉
|
|
@@ -164,6 +189,7 @@
|
|
|
.submitForm(formData.value, formData.value.postId)
|
|
.submitForm(formData.value, formData.value.postId)
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
onClose()
|
|
onClose()
|
|
|
|
|
+ submitLoading.value = false
|
|
|
emit('successful')
|
|
emit('successful')
|
|
|
})
|
|
})
|
|
|
.finally(() => {
|
|
.finally(() => {
|