generated from Leo_Ding/web-template
三个平台都添加站点的选择;所有需要上传图片的编辑对接
This commit is contained in:
parent
db3428381b
commit
ae9d98eee5
@ -32,7 +32,7 @@
|
||||
<span>南通市通州区互联网+智慧养老居家上门服务项目</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="paltform_list" v-if="currentPlatForm !== 'yunying'">
|
||||
<div class="paltform_list" v-if="ishow">
|
||||
<div value="CALL_CENTER" class="paltform_icon" @click="handleSelect('hujiao')">
|
||||
<div class="paltform_icon_1">
|
||||
<img :src="tel" alt="" srcset="" width="76" height="76" class="img">
|
||||
@ -55,7 +55,7 @@
|
||||
<div class="orgManage" v-else>
|
||||
<a-card style="width: 600px;margin:0 auto;height: 300px;">
|
||||
<div style="margin: 10px 0;color:#1677ff;cursor: pointer;">
|
||||
<span @click="currentPlatForm = 'jianguan'">{{ '< 返回' }}</span>
|
||||
<span @click="ishow = true">{{ '< 返回' }}</span>
|
||||
</div>
|
||||
<h3>请选择您的管理组织</h3>
|
||||
<ServiceStation @change="handleChange" :defaultOpen="true" />
|
||||
@ -85,6 +85,7 @@ const { locale, t } = useI18n()
|
||||
defineOptions({
|
||||
name: 'PlatForm',
|
||||
})
|
||||
const ishow = ref(true)
|
||||
const appStore = useAppStore()
|
||||
const routerStore = useRouterStore()
|
||||
const userStore = useUserStore()
|
||||
@ -97,18 +98,18 @@ onBeforeMount(() => {
|
||||
document.body.className = 'body-bg'
|
||||
})
|
||||
async function handleSelect(type) {
|
||||
if (type === 'yunying') {
|
||||
currentPlatForm.value = 'yunying'
|
||||
|
||||
} else {
|
||||
storage.local.setItem('platform', type)
|
||||
await appStore.init()
|
||||
goIndex()
|
||||
}
|
||||
|
||||
// if (type === 'hujiao') {
|
||||
// storage.local.setItem('platform', type)
|
||||
// await appStore.init()
|
||||
// goIndex()
|
||||
// } else {
|
||||
// currentPlatForm.value = type
|
||||
// ishow.value = false
|
||||
// }
|
||||
currentPlatForm.value = type
|
||||
ishow.value = false
|
||||
}
|
||||
async function goIndex() {
|
||||
console.log('goIndex')
|
||||
const indexRoute = getFirstValidRoute()
|
||||
console.log(indexRoute)
|
||||
if (!indexRoute) return
|
||||
@ -133,7 +134,7 @@ function getFirstValidRoute() {
|
||||
return indexRoute
|
||||
}
|
||||
async function handleChange(e) {
|
||||
storage.local.setItem('platform', 'yunying')
|
||||
storage.local.setItem('platform',currentPlatForm.value)
|
||||
storage.local.setItem('stationId', e)
|
||||
await appStore.init()
|
||||
goIndex()
|
||||
|
||||
@ -145,16 +145,6 @@
|
||||
{{ formatArea(formData.archive.houseAreaLabels) }} {{ formData.archive.householdDetailAddress || '' }}
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- 数组类字段 -->
|
||||
<a-col :span="24" v-if="formData.archive.idCardPhotos && formData.archive.idCardPhotos.length > 0">
|
||||
<div>
|
||||
<span class="label">身份证照片:</span>
|
||||
<div style="margin-top: 8px;">
|
||||
<a-image v-for="(url, index) in formData.archive.idCardPhotos" :key="index" :src="url" fit="cover"
|
||||
style="width: 100px; height: 60px; margin-right: 8px;" :preview-src-list="formData.archive.idCardPhotos" />
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -451,8 +451,7 @@
|
||||
<!-- 上传资料 -->
|
||||
<a-col :span="12">
|
||||
<a-form-item label="上传资料" name="uploadedDocuments">
|
||||
<gx-upload v-model="formData.archive.idCardPhotos"
|
||||
accept-types=".jpg,.png,.webp,.xlsx,.docx,.doc" :fileNumber="10" />
|
||||
<UploadInput v-model="uploadedDocuments"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -478,9 +477,10 @@ import dayjs from 'dayjs'
|
||||
import storage from '@/utils/storage'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { FastBackwardFilled } from '@ant-design/icons-vue'
|
||||
|
||||
import UploadInput from '@/components/Upload/UploadInput.vue'
|
||||
const emit = defineEmits(['ok'])
|
||||
const activeKey = ref('1')
|
||||
const uploadedDocuments=ref([])
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
const { formRecord, formData, formRef, formRules, resetForm } = useForm()
|
||||
const areaCascaderRef = ref()
|
||||
@ -540,11 +540,12 @@ async function handleEdit(record = {}) {
|
||||
formData.value = { ...data }
|
||||
formData.value.birthDate = dayjs(data.birthDate)
|
||||
formData.value.archive.idCardPhotos = data.archive.idCardPhotos ? data.archive.idCardPhotos.map(item => config('http.apiUpload') + item) : []
|
||||
formData.value.archive.uploadedDocuments = data.archive.uploadedDocuments ? data.archive.uploadedDocuments.map(item => config('http.apiUpload') + item) : []
|
||||
uploadedDocuments.value = data.archive.uploadedDocuments ? data.archive.uploadedDocuments.map(item => config('http.apiUpload') + item) : []
|
||||
|
||||
formData.value.governmentPurchasedServiceStartDate = [dayjs(formData.value.starGovernmentService), dayjs(formData.value.endGovernmentService)]
|
||||
nextTick(() => {
|
||||
areaCascaderRef.value.initData(data.archive.homeAreaCodes)
|
||||
houseAreaRef.value.initData(data.archive.houseAreaCodes)
|
||||
areaCascaderRef.value.initData(data.archive.homeAreaCodes||[''])
|
||||
houseAreaRef.value.initData(data.archive.houseAreaCodes||[''])
|
||||
})
|
||||
spining.value = false
|
||||
} catch (error) {
|
||||
@ -619,7 +620,7 @@ function handleOk() {
|
||||
|
||||
}
|
||||
params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : []
|
||||
params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments && formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : []
|
||||
params.archive.uploadedDocuments = uploadedDocuments.value && uploadedDocuments.value.length > 0 ? uploadedDocuments.value.map(item => spliceUrl(item)) : []
|
||||
if (formData.value.governmentPurchasedServiceStartDate && formData.value.governmentPurchasedServiceStartDate.length > 0) {
|
||||
params.archive.starGovernmentService = formData.value.governmentPurchasedServiceStartDate[0]
|
||||
params.archive.endGovernmentService = formData.value.governmentPurchasedServiceStartDate[1]
|
||||
@ -694,7 +695,6 @@ function handleCancel() {
|
||||
*/
|
||||
function onAfterClose() {
|
||||
activeKey.value='1'
|
||||
resetForm()
|
||||
formData.value.archive = {}
|
||||
hideLoading()
|
||||
}
|
||||
|
||||
@ -13,17 +13,17 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24" v-if="formData.directionType==='Transfer'">
|
||||
<a-form-item label="转出原因" name="reason">
|
||||
<a-select v-model:value="formData.reason" placeholder="请选择转出原因" allow-clear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.OUT_REASON"
|
||||
:key="item.dval" :value="item.dval">
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.OUT_REASON" :key="item.dval"
|
||||
:value="item.dval">
|
||||
{{ item.introduction }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24" v-if="formData.directionType==='Transfer'">
|
||||
<a-form-item label="转入节点" name="nStationId">
|
||||
<ServiceStation @change="handleChange" v-model:value="formData.nStationId" />
|
||||
</a-form-item>
|
||||
@ -35,8 +35,8 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" name="remark">
|
||||
<a-textarea v-model:value="formData.remark" placeholder="请输入备注"
|
||||
:rows="1" :auto-size="{ minRows: 1, maxRows: 2 }" />
|
||||
<a-textarea v-model:value="formData.remark" placeholder="请输入备注" :rows="1"
|
||||
:auto-size="{ minRows: 1, maxRows: 2 }" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -75,8 +75,8 @@ formData.value = {}
|
||||
function handleCreate(id) {
|
||||
formData.value.directionType = 'Transfer'
|
||||
formData.value.direction = 'Out'
|
||||
formData.value.customerId=storage.local.getItem('stationId'),
|
||||
formData.value.stationId=id
|
||||
formData.value.customerId = id
|
||||
|
||||
showModal({
|
||||
type: 'create',
|
||||
title: '转出',
|
||||
@ -101,6 +101,8 @@ function handleOk() {
|
||||
}
|
||||
if (params.directionType === 'Death') {
|
||||
params.passWayAt = dayjs(formData.value.passWayAt)
|
||||
} else {
|
||||
formData.value.stationId = storage.local.getItem('stationId')
|
||||
}
|
||||
let result = null
|
||||
switch (modal.value.type) {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div style="display: flex; justify-content: space-around;flex-direction: column;">
|
||||
<!-- 左侧信息栏 -->
|
||||
<div style="margin-top: 20px;display: flex;align-items: center;margin-left: 20px;">
|
||||
<gx-upload v-model="formData.imgList" accept-types=".jpg,.png,.webp" :fileNumber="1" />
|
||||
<gx-upload v-model="idCardPhotos" accept-types=".jpg,.png,.webp" :fileNumber="1" />
|
||||
<div style="margin-left: 20px;">
|
||||
<p style="font-weight: bold;">
|
||||
<span>{{ formData.name }}</span>
|
||||
@ -54,12 +54,13 @@ import {
|
||||
nextTick
|
||||
} from 'vue'
|
||||
import { useForm, useModal } from '@/hooks'
|
||||
import { config } from '@/config'
|
||||
import apis from '@/apis'
|
||||
const childData = ref({})
|
||||
const emit = defineEmits(['ok'])
|
||||
// 当前 tab key
|
||||
const activeKey = ref(1)
|
||||
|
||||
const idCardPhotos = ref([])
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
const { formData, resetForm } = useForm()
|
||||
|
||||
@ -106,6 +107,9 @@ const getBasicInfo = async () => {
|
||||
if (!success) {
|
||||
return
|
||||
}
|
||||
|
||||
idCardPhotos.value = data.archive.idCardPhotos ? data.archive.idCardPhotos.map(item => config('http.apiUpload') + item) : []
|
||||
console.log('idCardPhotos.value', idCardPhotos.value)
|
||||
return data;
|
||||
}
|
||||
const getDisabledPersonInfo = async () => {
|
||||
@ -152,6 +156,7 @@ function handleEdit(record = {}) {
|
||||
})
|
||||
recordId.value = record.id
|
||||
formData.value = cloneDeep(record)
|
||||
idCardPhotos.value = record.archive.idCardPhotos ? record.archive.idCardPhotos.map(item => config('http.apiUpload') + item) : []
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
|
||||
@ -615,22 +615,21 @@ const detailRef = ref()
|
||||
const lineOrderRef = ref()
|
||||
|
||||
onMounted(() => {
|
||||
searchFormData.value.serviceNodeIds = dicsStore.orgTree[0].value
|
||||
getCount(searchFormData.value.serviceNodeIds)
|
||||
searchFormData.value.stationId = storage.local.getItem('stationId') || ''
|
||||
})
|
||||
getPageList()
|
||||
|
||||
async function getCount(params) {
|
||||
try {
|
||||
const { success, data } = await apis.serverObj.getCount({ serviceNodeCodes: params })
|
||||
if (config('http.code.success') === success) {
|
||||
totalCount.value = data.count
|
||||
}
|
||||
} catch (error) {
|
||||
// async function getCount(params) {
|
||||
// try {
|
||||
// const { success, data } = await apis.serverObj.getCount({ serviceNodeCodes: params })
|
||||
// if (config('http.code.success') === success) {
|
||||
// totalCount.value = data.count
|
||||
// }
|
||||
// } catch (error) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
/**
|
||||
* 获取表格数据
|
||||
* @returns {Promise<void>}
|
||||
@ -653,6 +652,7 @@ async function getPageList() {
|
||||
if (config('http.code.success') === success) {
|
||||
listData.value = data
|
||||
paginationState.total = total
|
||||
totalCount.value = total
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
|
||||
@ -259,32 +259,12 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资质附件" name="qualificationFiles">
|
||||
<a-upload
|
||||
list-type="picture-card"
|
||||
v-model:file-list="formData.qualificationFiles"
|
||||
:before-upload="beforeUpload"
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<div v-if="formData.qualificationFiles.length < 5 && !isViewMode">
|
||||
<plus-outlined />
|
||||
<div class="ant-upload-text">上传</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<UploadInput v-model="formData.qualificationFiles"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="站点图片" name="siteImages">
|
||||
<a-upload
|
||||
list-type="picture-card"
|
||||
v-model:file-list="formData.siteImages"
|
||||
:before-upload="beforeUpload"
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<div v-if="formData.siteImages.length < 5 && !isViewMode">
|
||||
<plus-outlined />
|
||||
<div class="ant-upload-text">上传</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<gx-upload v-model="formData.siteImages" :fileNumber="1" accept-types=".jpg,.png,.webp" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -310,7 +290,8 @@ import { message } from 'ant-design-vue'
|
||||
import MapPickerModal from '@/components/Map/index.vue'
|
||||
import { useDicsStore } from '@/store'
|
||||
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||
|
||||
import UploadInput from '@/components/Upload/UploadInput.vue'
|
||||
import { getBirthDate, spliceUrl } from '@/utils/util'
|
||||
const emit = defineEmits(['ok'])
|
||||
const { t } = useI18n()
|
||||
const { modal, showModal, hideModal } = useModal()
|
||||
@ -449,8 +430,8 @@ async function loadRecord(id, forView = false) {
|
||||
closeTime: record.closeAt ? dayjs(`1970-01-01 ${record.closeAt}`) : null,
|
||||
businessStatus: record.status || '',
|
||||
services: record.provideServices || [],
|
||||
qualificationFiles: record.qualificationAttachment?.map(url => ({ uid: url, url })) || [],
|
||||
siteImages: record.stationImgs?.map(url => ({ uid: url, url })) || [],
|
||||
qualificationFiles: (record.qualificationAttachment && record.qualificationAttachment.length > 0) ? record.qualificationAttachment.map(item => config('http.apiUpload') + item) : [],
|
||||
siteImages: (record.stationImgs && record.stationImgs.length > 0) ? record.stationImgs.map(item => config('http.apiUpload') + item) : [],
|
||||
latitude: record.latitude || 0,
|
||||
longitude: record.longitude || 0,
|
||||
}
|
||||
@ -497,7 +478,8 @@ function handleOk() {
|
||||
Status: values.businessStatus || '',
|
||||
ProvideServices: values.services?.length ? values.services : null,
|
||||
QualificationAttachment: values.qualificationFiles?.map(f => f.url || f.response?.url) || null,
|
||||
StationImgs: values.siteImages?.map(f => f.url || f.response?.url) || null,
|
||||
QualificationAttachment:( values.qualificationFiles && values.qualificationFiles.length) > 0 ? values.qualificationFiles.map(item => spliceUrl(item)) : [],
|
||||
StationImgs:( values.siteImages && values.siteImages.length) > 0 ? values.siteImages.map(item => spliceUrl(item)) : [],
|
||||
}
|
||||
|
||||
let result
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<x-search-bar class="mb-4">
|
||||
<template #default="{ gutter, colSpan }">
|
||||
<a-form :label-col="{ style: { width: '100px' } }" :model="searchFormData" layout="inline">
|
||||
<a-form :model="searchFormData" layout="inline">
|
||||
<!-- 基础查询字段 -->
|
||||
<a-row :gutter="gutter">
|
||||
<a-col v-bind="colSpan">
|
||||
@ -108,7 +108,7 @@
|
||||
</a-collapse>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<a-row :gutter="gutter" style="margin-top: 16px;">
|
||||
<a-row :gutter="gutter">
|
||||
<a-col :span="24" style="text-align: right;">
|
||||
<a-space>
|
||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user