帮扶任务分配
This commit is contained in:
@@ -197,8 +197,16 @@ import { onLoad } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import config from "@/config.js"
|
||||
|
||||
const props = defineProps({
|
||||
allocationId:{
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
})
|
||||
const title = ref('');
|
||||
const formData = reactive({
|
||||
allocationId:'',
|
||||
name: '',
|
||||
idCard: '',
|
||||
tagId: '',
|
||||
@@ -219,7 +227,7 @@ const getBackgroundStyle = (imageName) => ({
|
||||
backgroundPosition: 'center', // 居中
|
||||
backgroundRepeat: 'no-repeat'
|
||||
});
|
||||
const emit = defineEmits(['update:showView'])
|
||||
const emit = defineEmits(['update:showVue'])
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/person_database_status').then((resData) => {
|
||||
if(resData && resData.code == 200){
|
||||
@@ -269,13 +277,18 @@ function getabelByValue(value,arr) {
|
||||
return item ? item.text : '暂无'
|
||||
}
|
||||
const handleCancel = () => {
|
||||
emit('update:showView', 'main')
|
||||
emit('update:showVue', {
|
||||
showVue: 'main',
|
||||
selectedPersonIds: []
|
||||
});
|
||||
// emit('update:showVue', 'main')
|
||||
}
|
||||
function handleSearch(){
|
||||
dataList.value=[]
|
||||
getDataList()
|
||||
}
|
||||
function handleReset(){
|
||||
formData.allocationId=''
|
||||
formData.name=''
|
||||
formData.idCard=''
|
||||
formData.tagId=''
|
||||
@@ -286,11 +299,20 @@ function handleReset(){
|
||||
getDataList()
|
||||
}
|
||||
function getDataList(){
|
||||
let url=''
|
||||
if(props.allocationId){
|
||||
formData.allocationId=props.allocationId
|
||||
url='/dispatch/assist/person/database/pageAllocatePersonList'
|
||||
}else{
|
||||
url='/dispatch/assist/person/database/pageList'
|
||||
}
|
||||
|
||||
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/dispatch/assist/person/database/pageList',formData,'get',9100,header).then((resData) => {
|
||||
$api.myRequest(url,formData,'get',9100,header).then((resData) => {
|
||||
resData.rows.forEach(item=>{
|
||||
item.tags=item.tagName.split(',')
|
||||
item.assistStatus=getabelByValue(item.assistStatus,personDatabaseStatusOptions)
|
||||
@@ -318,8 +340,8 @@ function selectItem(item) {
|
||||
}
|
||||
// 获取选中的数据
|
||||
function handlesubmit() {
|
||||
emit('update:showView', {
|
||||
showView: 'main',
|
||||
emit('update:showVue', {
|
||||
showVue: 'main',
|
||||
selectedPersonIds: selectedPersonIds.value
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user