diff --git a/src/apis/modules/serverObj.js b/src/apis/modules/serverObj.js
index 9f93651..ad98068 100644
--- a/src/apis/modules/serverObj.js
+++ b/src/apis/modules/serverObj.js
@@ -14,5 +14,5 @@ export const updateItem = (id, params) => request.basic.put(`/api/v1/customers/$
export const delItem = (id) => request.basic.delete(`/api/v1/customers/${id}`)
//获取用户数量
-export const getCount=()=>request.basic.get('/api/v1/customers/count')
+export const getCount=(params)=>request.basic.get('/api/v1/customers/count',params)
diff --git a/src/apis/modules/serviceStaffList.js b/src/apis/modules/serviceStaffList.js
new file mode 100644
index 0000000..fe2b4bb
--- /dev/null
+++ b/src/apis/modules/serviceStaffList.js
@@ -0,0 +1,16 @@
+/**
+ * 区域模块接口
+ */
+import request from '@/utils/request'
+// 获取项目列表
+export const getProjectList = (params) => request.basic.get('/api/v1/service-people', params)
+// 获取单挑数据
+export const getItem = (id) => request.basic.get(`/api/v1/service-people/${id}`)
+// 添加条目
+export const createItem = (params) => request.basic.post('/api/v1/service-people', params)
+// 更新role
+export const updateItem = (id, params) => request.basic.put(`/api/v1/service-people/${id}`, params)
+// 删除数据
+export const delItem = (id) => request.basic.delete(`/api/v1/service-people/${id}`)
+
+
diff --git a/src/components/NodeTree/index.vue b/src/components/NodeTree/index.vue
new file mode 100644
index 0000000..af65517
--- /dev/null
+++ b/src/components/NodeTree/index.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/index.js b/src/components/index.js
index 9197d16..186b6bc 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -22,6 +22,7 @@ import Cascader from './Cascader/Cascader.vue'
import { setupLoadingDirective } from './Loading/directive'
import GxUpload from './GxUpload/index.vue'
import GxMap from './GxMap/index.vue'
+import NodeTree from './NodeTree/index.vue'
const componentList = [
ActionBar,
@@ -44,7 +45,8 @@ const componentList = [
Scrollbar,
Cascader,
GxUpload,
- GxMap
+ GxMap,
+ NodeTree
]
export const loading = Loading
diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue
index a17dd05..dc55722 100644
--- a/src/layouts/BasicLayout.vue
+++ b/src/layouts/BasicLayout.vue
@@ -5,23 +5,17 @@
-
+
-
-
+
+
@@ -32,28 +26,19 @@
-
+
-
+
-
-
+
+
@@ -68,23 +53,17 @@
-
+
-
+
-
+
@@ -92,26 +71,18 @@
-
+
-
+
-
-
+
@@ -122,16 +93,11 @@
-
+
-
+
@@ -145,7 +111,7 @@
+
+
diff --git a/src/views/baseSet/serverProjectManage/index.vue b/src/views/baseSet/serverProjectManage/index.vue
new file mode 100644
index 0000000..062e162
--- /dev/null
+++ b/src/views/baseSet/serverProjectManage/index.vue
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ item.introduction }}
+
+
+
+
+
+
+ {{
+ item.introduction }}
+
+
+
+
+
+
+ {{
+ item.introduction }}
+
+
+
+
+
+
+ {{ $t('button.reset') }}
+
+ {{ $t('button.search') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 新建
+ 导出
+ 导出记录
+
+
+
+
+
+ {{ index + 1 }}
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/serverObj/serverList/components/EditDialog.vue b/src/views/serverObj/serverList/components/EditDialog.vue
index 4ea2785..15bf8a6 100644
--- a/src/views/serverObj/serverList/components/EditDialog.vue
+++ b/src/views/serverObj/serverList/components/EditDialog.vue
@@ -25,7 +25,7 @@
-
+
@@ -34,7 +34,7 @@
{{ item.introduction }}
-
@@ -75,19 +75,6 @@
-
-
-
-
-
-
- {{ item.introduction }}
-
-
-
-
-
@@ -97,16 +84,17 @@
-
-
+
+
-
-
+
+
{{ item.introduction }}
@@ -117,8 +105,8 @@
-
-
+
+
{{ item.introduction }}
@@ -129,8 +117,8 @@
-
-
+
+
{{
item.introduction }}
@@ -140,8 +128,9 @@
-
-
+
+
{{ item.introduction }}
@@ -152,8 +141,9 @@
-
-
+
+
{{ item.introduction }}
@@ -163,13 +153,13 @@
-
-
+
+
-
-
+
+
@@ -181,15 +171,15 @@
-
-
+
+
-
-
+
+
@@ -203,7 +193,8 @@
-
+
{{ item.introduction }}
@@ -215,7 +206,8 @@
-
+
{{ item.introduction }}
@@ -227,7 +219,8 @@
-
+
{{ item.introduction }}
@@ -239,7 +232,7 @@
-
@@ -252,7 +245,7 @@
-
@@ -265,7 +258,7 @@
-
@@ -278,8 +271,8 @@
-
+
{{ item.introduction }}
@@ -291,7 +284,7 @@
-
+
{{ item.introduction }}
@@ -303,8 +296,8 @@
-
+
{{ item.introduction }}
@@ -316,7 +309,7 @@
-
@@ -329,7 +322,8 @@
-
+
{{ item.introduction }}
@@ -341,7 +335,8 @@
-
+
{{ item.introduction }}
@@ -353,7 +348,7 @@
-
+
{{ item.introduction }}
@@ -365,7 +360,7 @@
-
+
{{ item.introduction }}
@@ -377,7 +372,7 @@
-
@@ -390,7 +385,8 @@
-
+
{{ item.introduction }}
@@ -398,23 +394,33 @@
-
+
+
+
+ {{
+ item.introduction }}
+
+
+
-
+
-
+
-
@@ -422,26 +428,16 @@
-
-
-
+
-
-
-
+
@@ -460,8 +456,9 @@ import { useForm, useModal } from '@/hooks'
import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue'
import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate'
-import { getBirthDate } from '@/utils/util'
+import { getBirthDate, spliceUrl } from '@/utils/util'
import dayjs from 'dayjs'
+
import { message } from 'ant-design-vue'
const emit = defineEmits(['ok'])
const activeKey = ref('1')
@@ -471,16 +468,23 @@ const cancelText = ref('取消')
formRules.value = {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
- idNumber: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
+ identityNo: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
contact1: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
- healthStatus: [{ required: true, message: '请选择健康状况', trigger: 'change' }],
- survivalStatus: [{ required: true, message: '请选择生存状态', trigger: 'change' }],
- homeAreaCodes: [{ required: true, message: '请选择并输入家庭地址', trigger: 'change' }],
- serviceStatus: [{ required: true, message: '请选择服务状态', trigger: 'change' }],
- homeDetailAddress: [{ required: true, message: '请输入详细地址', trigger: 'change' }],
+ archive: {
+ healthStatus: [{ required: true, message: '请选择健康状况', trigger: 'change' }],
+ serviceStatus: [{ required: true, message: '请选择服务状态', trigger: 'change' }],
+ homeAreaCodes: [{ required: true, message: '请选择并输入家庭地址', trigger: 'change' }],
+ homeDetailAddress: [{ required: true, message: '请输入详细地址', trigger: 'change' }],
+
+ },
}
const dicsStore = useDicsStore()
+formData.value = {
+ archive: {
+
+ }
+}
/**
* 新建
*/
@@ -506,6 +510,10 @@ async function handleEdit(record = {}) {
return
}
formData.value = { ...data }
+ formData.value.birthDate=dayjs(data.birthDate)
+ formData.value.archive.idCardPhotos = data.archive.idCardPhotos ? data.archive.idCardPhotos.map(item => config('http.apiBasic') + item) : []
+ formData.value.archive.uploadedDocuments = data.archive.uploadedDocuments ? data.archive.uploadedDocuments.map(item => config('http.apiBasic') + item) : []
+ formData.value.governmentPurchasedServiceStartDate=[dayjs(formData.value.starGovernmentService),dayjs(formData.value.endGovernmentService)]
}
// utils/idCard.js
function isValidIdCard(value) {
@@ -567,11 +575,19 @@ function handleOk() {
.then(async (values) => {
try {
showLoading()
- const params = {
+ let params = {
...formData.value,
+ labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
+ birthDate:dayjs(formData.value.birthDate).format('YYYY-MM-DD')
+ }
+ params.archive.idCardPhotos = formData.value.archive.idCardPhotos ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : ['']
+ params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : ['']
+ if(formData.value.governmentPurchasedServiceStartDate.length>0){
+ params.archive.starGovernmentService=dayjs(formData.value.governmentPurchasedServiceStartDate[0]).format('YYYY-MM-DD')
+ params.archive.endGovernmentService=dayjs(formData.value.governmentPurchasedServiceStartDate[1]).format('YYYY-MM-DD')
}
// 单独封装一个同步校验函数
- if (params.identityType === '1' && !isValidIdCard(params.idNumber)) {
+ if (params.identityType === '1' && !isValidIdCard(params.identityNo)) {
throw new Error('请输入正确的身份证号码');
}
@@ -584,7 +600,8 @@ function handleOk() {
console.log('result', result.code)
break
case 'edit':
- result = await apis.serverObj.updateItem(params).catch(() => {
+ console.log(params)
+ result = await apis.serverObj.updateItem(params.id,params).catch(() => {
throw new Error()
})
break
@@ -596,7 +613,7 @@ function handleOk() {
}
} catch (error) {
hideLoading()
- message.error(error.message)
+ // message.error(error.message)
}
})
.catch(() => {
@@ -606,26 +623,40 @@ function handleOk() {
// 提取出生日期方法
const extractBirthDateFromIdCard = () => {
console.log(111)
- const { idNumber } = formData.value;
- if (!idNumber) {
+ const { identityNo } = formData.value;
+ if (!identityNo) {
formData.value.birthDate = '';
return;
}
- console.log(getBirthDate(idNumber))
- formData.value.birthDate = dayjs(getBirthDate(idNumber));
+ console.log(getBirthDate(identityNo))
+ formData.value.birthDate = dayjs(getBirthDate(identityNo));
};
function onAreaChange(value, labels) {
- console.log(formData.value.homeAreaCodes);
- formData.value.homeAreaLabels = [...labels]
+
+ formData.value.archive.homeAreaLabels = [...labels]
}
function onAreaHoldChange(value, labels) {
- console.log(formData.value.houseAreaCodes);
- formData.value.houseAreaLabels = [...labels]
+
+ formData.value.archive.houseAreaLabels = [...labels]
}
function handleGetLng(obj) {
formData.value.lat = obj.lat
- formData.value.lng = obj.lng
+ formData.value.lag = obj.lng
}
+// 修复自定义上传方法
+const handleCustomRequest = async (options) => {
+ const { file, onProgress, onSuccess, onError } = options;
+
+ try {
+ const formData = new FormData();
+ formData.append('file', file);
+ const { data } = await apis.common.uploadFile(formData);
+ const fullUrl = config('http.apiBasic') + data;
+ console.log(fullUrl)
+ } catch (err) {
+ message.error('上传失败');
+ }
+};
/**
* 取消
*/
@@ -638,6 +669,7 @@ function handleCancel() {
*/
function onAfterClose() {
resetForm()
+ formData.value.archive = {}
hideLoading()
}
diff --git a/src/views/serverObj/serverList/index.vue b/src/views/serverObj/serverList/index.vue
index 2c5a14a..85ff4e3 100644
--- a/src/views/serverObj/serverList/index.vue
+++ b/src/views/serverObj/serverList/index.vue
@@ -3,22 +3,15 @@
-
-
-
-
- sss
- {{ label }}
-
-
+
+
+
-
-
-
+
+
+
@@ -47,8 +40,8 @@
- {{
+ {{
item.introduction }}
@@ -219,15 +212,8 @@
-
-
-
- Child Node1 {{ value
- }}
-
-
+
+
@@ -294,6 +280,24 @@
{{ index + 1 }}
+
+ {{ record.gender === '1' ? '男' : '女' }}
+
+
+ {{ dicsStore.getDictLabel('LIVING_STATUS', record.survivalStatus) }}
+
+
+ {{ dicsStore.getDictLabel('Health_Condition', record.healthStatus) }}
+
+
+ {{ record.governmentPurchasedService ? '是' : '' }}
+
+
+ {{
+ dicsStore.getDictLabel('Service_Recipient_Category2', record.serviceRecipientCategory)
+ }}
+
+
详情
@@ -322,7 +326,7 @@
diff --git a/src/views/serviceStaff/serviceStaffList/index.vue b/src/views/serviceStaff/serviceStaffList/index.vue
index ab44e8d..8d689e0 100644
--- a/src/views/serviceStaff/serviceStaffList/index.vue
+++ b/src/views/serviceStaff/serviceStaffList/index.vue
@@ -5,15 +5,8 @@
-
-
-
- sss
- {{ label }}
-
-
+
+
@@ -25,13 +18,13 @@
-
-
+
+
-
-
+
+
{{
item.introduction }}
@@ -39,8 +32,8 @@
-
-
+
+
{{
item.introduction }}
@@ -48,8 +41,8 @@
-
-
+
+
{{
item.introduction }}
@@ -74,7 +67,7 @@
- 新建
+ 新建
导出
导出记录
@@ -89,9 +82,6 @@
编辑
-
- 详情
-
删除
@@ -117,6 +107,7 @@ import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue'
import detail from './components/detail.vue'
import dayjs from 'dayjs'
+import NodeTree from '@/components/NodeTree/index.vue'
defineOptions({
name: 'allocation',
})
@@ -146,55 +137,61 @@ const columns = [
},
{
title: '电话',
- dataIndex: 'contact',
- key: 'contact',
+ dataIndex: 'phone',
+ key: 'phone',
align: 'center',
width: 80,
},
{
title: '身份证号',
- dataIndex: 'idNumber',
- key: 'idNumber',
+ dataIndex: 'idCard',
+ key: 'idCard',
align: 'center',
width: 180,
},
{
title: '护理人员类型',
- dataIndex: 'staffType',
- key: 'staffType',
+ dataIndex: 'serviceType',
+ key: 'serviceType',
align: 'center',
width: 120,
},
{
title: '用工形式',
- dataIndex: 'useType',
- key: 'useType',
+ dataIndex: 'workType',
+ key: 'workType',
+ align: 'center',
+ width: 120,
+ },
+ {
+ title: '状态',
+ dataIndex: 'status',
+ key: 'status',
align: 'center',
width: 120,
},
-
// --- 联系方式 ---
{
- title: '护理人员状态',
- dataIndex: 'staffStatus',
- key: 'staffStatus',
+ title: '护理人员类型',
+ dataIndex: 'serviceType',
+ key: 'serviceType',
align: 'center',
width: 130,
},
{
title: '所属服务组织',
- dataIndex: 'orgName',
- key: 'orgName',
- align: 'center',
- width: 120,
- },
- {
- title: '组织所在区域',
- dataIndex: 'region',
- key: 'region',
+ dataIndex: 'stationName',
+ key: 'stationName',
align: 'center',
width: 120,
},
+ // {
+ // title: '组织所在区域',
+ // dataIndex: 'areaLabels',
+ // key: 'areaLabels',
+ // align: 'center',
+ // width: 120,
+ // },
{
title: '操作',
@@ -275,7 +272,7 @@ getPageList()
async function getPageList() {
try {
const { pageSize, current } = paginationState
- const { success, data, total } = await apis.serverObj
+ const { success, data, total } = await apis.serviceStaffList
.getProjectList({
pageSize,
current: current,