generated from Leo_Ding/web-template
添加人员
This commit is contained in:
parent
5db5db8778
commit
1eaf10502b
16
src/apis/modules/contacts.js
Normal file
16
src/apis/modules/contacts.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* 区域模块接口
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
// 获取项目列表
|
||||||
|
export const getProjectList = (params) => request.basic.get('/api/v1/concats', params)
|
||||||
|
// 获取单挑数据
|
||||||
|
export const getItem = (id) => request.basic.get(`/api/v1/concats/${id}`)
|
||||||
|
// 添加条目
|
||||||
|
export const createItem = (params) => request.basic.post('/api/v1/concats', params)
|
||||||
|
// 更新role
|
||||||
|
export const updateItem = (params) => request.basic.put(`/api/v1/concats/${params.id}`, params)
|
||||||
|
// 删除数据
|
||||||
|
export const delItem = (id) => request.basic.delete(`/api/v1/concats/${id}`)
|
||||||
|
|
||||||
|
|
||||||
@ -77,4 +77,5 @@ export default {
|
|||||||
qualityLog:'质检记录',
|
qualityLog:'质检记录',
|
||||||
operatorMgt:'话务员管理',
|
operatorMgt:'话务员管理',
|
||||||
operator:'话务员列表',
|
operator:'话务员列表',
|
||||||
|
contacts:'联系人管理',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,6 +100,17 @@ export default [
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
permission: '*',
|
permission: '*',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'contacts',
|
||||||
|
name: 'contacts',
|
||||||
|
component: 'serverObj/contacts/index.vue',
|
||||||
|
meta: {
|
||||||
|
title: '联系人管理',
|
||||||
|
isMenu: true,
|
||||||
|
keepAlive: true,
|
||||||
|
permission: '*',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<span>南通市通州区互联网+智慧养老居家上门服务项目</span>
|
<span>南通市通州区互联网+智慧养老居家上门服务项目</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="paltform_list" v-if="ishow">
|
<div class="paltform_list" v-if="currentPlatForm !== 'yunying'">
|
||||||
<div value="CALL_CENTER" class="paltform_icon" @click="handleSelect('hujiao')">
|
<div value="CALL_CENTER" class="paltform_icon" @click="handleSelect('hujiao')">
|
||||||
<div class="paltform_icon_1">
|
<div class="paltform_icon_1">
|
||||||
<img :src="tel" alt="" srcset="" width="76" height="76" class="img">
|
<img :src="tel" alt="" srcset="" width="76" height="76" class="img">
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="orgManage" v-else>
|
<div class="orgManage" v-else>
|
||||||
<a-card style="width: 600px;margin:0 auto;height: 300px;">
|
<a-card style="width: 600px;margin:0 auto;height: 300px;">
|
||||||
<div style="margin: 10px 0;color:#1677ff;cursor: pointer;">
|
<div style="margin: 10px 0;color:#1677ff;cursor: pointer;">
|
||||||
<span @click="ishow = true">{{ '< 返回' }}</span>
|
<span @click="currentPlatForm = 'jianguan'">{{ '< 返回' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<h3>请选择您的管理组织</h3>
|
<h3>请选择您的管理组织</h3>
|
||||||
<ServiceStation @change="handleChange" :defaultOpen="true"/>
|
<ServiceStation @change="handleChange" :defaultOpen="true"/>
|
||||||
@ -85,7 +85,6 @@ const { locale, t } = useI18n()
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'PlatForm',
|
name: 'PlatForm',
|
||||||
})
|
})
|
||||||
const ishow = ref(true)
|
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const routerStore = useRouterStore()
|
const routerStore = useRouterStore()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@ -98,18 +97,18 @@ onBeforeMount(() => {
|
|||||||
document.body.className = 'body-bg'
|
document.body.className = 'body-bg'
|
||||||
})
|
})
|
||||||
async function handleSelect(type) {
|
async function handleSelect(type) {
|
||||||
// if (type === 'hujiao') {
|
if (type === 'yunying') {
|
||||||
// storage.local.setItem('platform', type)
|
currentPlatForm.value = 'yunying'
|
||||||
// await appStore.init()
|
|
||||||
// goIndex()
|
} else {
|
||||||
// } else {
|
storage.local.setItem('platform', type)
|
||||||
// currentPlatForm.value = type
|
await appStore.init()
|
||||||
// ishow.value = false
|
goIndex()
|
||||||
// }
|
}
|
||||||
currentPlatForm.value = type
|
|
||||||
ishow.value = false
|
|
||||||
}
|
}
|
||||||
async function goIndex() {
|
async function goIndex() {
|
||||||
|
console.log('goIndex')
|
||||||
const indexRoute = getFirstValidRoute()
|
const indexRoute = getFirstValidRoute()
|
||||||
console.log(indexRoute)
|
console.log(indexRoute)
|
||||||
if (!indexRoute) return
|
if (!indexRoute) return
|
||||||
@ -134,7 +133,7 @@ function getFirstValidRoute() {
|
|||||||
return indexRoute
|
return indexRoute
|
||||||
}
|
}
|
||||||
async function handleChange(e) {
|
async function handleChange(e) {
|
||||||
storage.local.setItem('platform',currentPlatForm.value)
|
storage.local.setItem('platform', 'yunying')
|
||||||
storage.local.setItem('stationId', e)
|
storage.local.setItem('stationId', e)
|
||||||
await appStore.init()
|
await appStore.init()
|
||||||
goIndex()
|
goIndex()
|
||||||
|
|||||||
136
src/views/serverObj/contacts/components/EditDialog.vue
Normal file
136
src/views/serverObj/contacts/components/EditDialog.vue
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal :open="modal.open" :title="modal.title" :width="600" :confirm-loading="modal.confirmLoading"
|
||||||
|
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
|
||||||
|
<a-form ref="formRef" :model="formData" :rules="formRules">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<!-- 姓名 -->
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="分配到" name="name" :rules="[{ required: true, message: '请选择节点' }]">
|
||||||
|
<a-tree-select v-model:value="formData.name" style="width: 100%" :tree-data="treeData" tree-checkable
|
||||||
|
allow-clear :show-checked-strategy="SHOW_PARENT" placeholder="请选择站点"
|
||||||
|
tree-node-filter-prop="label" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
import { ref, defineProps } from 'vue'
|
||||||
|
import { config } from '@/config'
|
||||||
|
import apis from '@/apis'
|
||||||
|
import { useForm, useModal } from '@/hooks'
|
||||||
|
import { useDicsStore } from '@/store'
|
||||||
|
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||||
|
const emit = defineEmits(['ok'])
|
||||||
|
const activeKey = ref('1')
|
||||||
|
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||||
|
const { formRecord, formData, formRef, formRules, resetForm } = useForm()
|
||||||
|
const cancelText = ref('取消')
|
||||||
|
const treeData = [
|
||||||
|
{
|
||||||
|
label: 'Node1',
|
||||||
|
value: '0-0',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: 'Child Node1',
|
||||||
|
value: '0-0-0',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Node2',
|
||||||
|
value: '0-1',
|
||||||
|
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: 'Child Node3',
|
||||||
|
value: '0-1-0',
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Child Node4',
|
||||||
|
value: '0-1-1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Child Node5',
|
||||||
|
value: '0-1-2',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新建
|
||||||
|
*/
|
||||||
|
function handleCreate() {
|
||||||
|
showModal({
|
||||||
|
type: 'create',
|
||||||
|
title: '分配节点',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
formRef.value
|
||||||
|
.validateFields()
|
||||||
|
.then(async (values) => {
|
||||||
|
try {
|
||||||
|
showLoading()
|
||||||
|
const params = {
|
||||||
|
...formData.value,
|
||||||
|
}
|
||||||
|
let result = null
|
||||||
|
switch (modal.value.type) {
|
||||||
|
case 'create':
|
||||||
|
result = await apis.serverObj.createItem(params).catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 'edit':
|
||||||
|
result = await apis.serverObj.updateItem(params).catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
|
hideLoading()
|
||||||
|
if (config('http.code.success') === result?.code) {
|
||||||
|
hideModal()
|
||||||
|
emit('ok')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
hideModal()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭后
|
||||||
|
*/
|
||||||
|
function onAfterClose() {
|
||||||
|
resetForm()
|
||||||
|
hideLoading()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
handleCreate,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
271
src/views/serverObj/contacts/index.vue
Normal file
271
src/views/serverObj/contacts/index.vue
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
<template>
|
||||||
|
<x-search-bar class="mb-8-2">
|
||||||
|
<template #default="{ gutter, colSpan }">
|
||||||
|
<a-form :model="searchFormData" layout="inline" labelAlign="left">
|
||||||
|
<a-row :gutter="[24, 24]">
|
||||||
|
<!-- 姓名 -->
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="姓名" name="name">
|
||||||
|
<a-input v-model:value="searchFormData.name" placeholder="请输入姓名" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<!-- 身份证号 -->
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="身份证号" name="identityNo">
|
||||||
|
<a-input v-model:value="searchFormData.identityNo" placeholder="请输入身份证号" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<a-col class="align-left" :span="8">
|
||||||
|
<a-space>
|
||||||
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
|
{{ $t('button.search') }}
|
||||||
|
</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</template>
|
||||||
|
</x-search-bar>
|
||||||
|
<a-row :gutter="8" :wrap="false">
|
||||||
|
<a-col flex="auto">
|
||||||
|
<a-card title="电话关爱对象列表">
|
||||||
|
<template #extra>
|
||||||
|
<a-space>
|
||||||
|
<a-button type="primary">导入</a-button>
|
||||||
|
<a-button type="dashed">导入记录</a-button>
|
||||||
|
<a-button type="primary">导出</a-button>
|
||||||
|
<a-button type="dashed">导出记录</a-button>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||||
|
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
|
||||||
|
<template #bodyCell="{ index, column, record }">
|
||||||
|
<template v-if="column.key === 'serialNumber'">
|
||||||
|
<span>{{ index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-if="'action' === column.key">
|
||||||
|
<x-action-button @click="$refs.editDialogRef.handleCreate(record)">
|
||||||
|
<span>编辑</span>
|
||||||
|
</x-action-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</a-card>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { message, Modal } from 'ant-design-vue'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import apis from '@/apis'
|
||||||
|
import { config } from '@/config'
|
||||||
|
import { usePagination } from '@/hooks'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
import { useDicsStore } from '@/store'
|
||||||
|
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
defineOptions({
|
||||||
|
name: 'allocation',
|
||||||
|
})
|
||||||
|
const dicsStore = useDicsStore()
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'serialNumber',
|
||||||
|
key: 'serialNumber',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名字',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
},
|
||||||
|
|
||||||
|
// --- 联系方式 ---
|
||||||
|
{
|
||||||
|
title: '联系方式',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
key: 'phone',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关系',
|
||||||
|
dataIndex: 'relationType',
|
||||||
|
key: 'relationType',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '性别',
|
||||||
|
dataIndex: 'gender',
|
||||||
|
key: 'gender',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身份证号',
|
||||||
|
dataIndex: 'identityNo',
|
||||||
|
key: 'identityNo',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '紧急联系人',
|
||||||
|
dataIndex: 'isEmergency',
|
||||||
|
key: 'isEmergency',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '工作类型',
|
||||||
|
dataIndex: 'workCondition',
|
||||||
|
key: 'workCondition',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '家庭地址',
|
||||||
|
dataIndex: 'areaCodes',
|
||||||
|
key: 'areaCodes',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '详细地址',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'address',
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
key: 'action',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const { t } = useI18n() // 解构出t方法
|
||||||
|
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
|
||||||
|
const editDialogRef = ref()
|
||||||
|
getPageList()
|
||||||
|
|
||||||
|
async function getPageList() {
|
||||||
|
try {
|
||||||
|
const { pageSize, current } = paginationState
|
||||||
|
const { success, data, total } = await apis.contacts
|
||||||
|
.getProjectList({
|
||||||
|
pageSize,
|
||||||
|
current: current,
|
||||||
|
...searchFormData.value,
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
listData.value = data
|
||||||
|
paginationState.total = total
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**核销 */
|
||||||
|
const checkHandler = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '即将核销是否继续',
|
||||||
|
content: t('button.confirm'),
|
||||||
|
okText: t('button.confirm'),
|
||||||
|
onOk: async () => {
|
||||||
|
const params = {
|
||||||
|
...record,
|
||||||
|
status: 'success'
|
||||||
|
}
|
||||||
|
const { success } = await apis.productOrder.updateItem(params.id, params).catch(() => {
|
||||||
|
// throw new Error()
|
||||||
|
})
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
// resolve()
|
||||||
|
message.success('核销成功')
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
function handleDelete({ id }) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: t('pages.system.user.delTip'),
|
||||||
|
content: t('button.confirm'),
|
||||||
|
okText: t('button.confirm'),
|
||||||
|
onOk: () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
; (async () => {
|
||||||
|
try {
|
||||||
|
const { success } = await apis.productOrder.delItem(id).catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
resolve()
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页
|
||||||
|
*/
|
||||||
|
function onTableChange({ current, pageSize }) {
|
||||||
|
paginationState.current = current
|
||||||
|
paginationState.pageSize = pageSize
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
function handleSearch() {
|
||||||
|
resetPagination()
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function handleResetSearch() {
|
||||||
|
searchFormData.value = {}
|
||||||
|
resetPagination()
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 编辑完成
|
||||||
|
*/
|
||||||
|
async function onOk() {
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
@ -5,6 +5,9 @@
|
|||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<div><span class="label">出生日期:</span> {{ dayjs(formData.birthDate).format('YYYY-MM-DD') || '-' }}</div>
|
<div><span class="label">出生日期:</span> {{ dayjs(formData.birthDate).format('YYYY-MM-DD') || '-' }}</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<div><span class="label">所属站点:</span> {{ formData.stationName || '-' }}</div>
|
||||||
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<div><span class="label">关爱巡访电话:</span> {{ formData.careVisitPhone || '-' }}</div>
|
<div><span class="label">关爱巡访电话:</span> {{ formData.careVisitPhone || '-' }}</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|||||||
@ -1,6 +1,323 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>新建文件</div>
|
<a-row :gutter="8" :wrap="false">
|
||||||
|
<a-col flex="auto">
|
||||||
|
<a-card title="电话关爱对象列表">
|
||||||
|
<template #extra>
|
||||||
|
<a-button type="primary" @click="showModal">新增</a-button>
|
||||||
|
</template>
|
||||||
|
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||||
|
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
|
||||||
|
<template #bodyCell="{ index, column, record }">
|
||||||
|
<template v-if="column.key === 'serialNumber'">
|
||||||
|
<span>{{ index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-if="'action' === column.key">
|
||||||
|
<x-action-button @click="$refs.editDialogRef.handleCreate(record)">
|
||||||
|
<span>编辑</span>
|
||||||
|
</x-action-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</a-card>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-modal v-model:open="visibleOpen" title="添加联系人" @ok="handleOk" :width="800">
|
||||||
|
<a-card>
|
||||||
|
<a-form ref="formRef" :model="contactForm" :rules="formRules" >
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<!-- 姓名 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="姓名" name="name">
|
||||||
|
<a-input v-model:value="contactForm.name" placeholder="请输入姓名" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="联系方式" name="phone">
|
||||||
|
<a-input v-model:value="contactForm.phone" placeholder="请输入联系方式" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 性别 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="性别" name="gender">
|
||||||
|
<a-radio-group v-model:value="contactForm.gender">
|
||||||
|
<a-radio value="1">男</a-radio>
|
||||||
|
<a-radio value="2">女</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="年龄" name="age" >
|
||||||
|
<a-input-number v-model:value="contactForm.age" placeholder="请输入年龄" style="width: 100%;" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- 证件号码 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="证件号码" name="identityNo">
|
||||||
|
<span style="display: inline-flex; width: 100%;">
|
||||||
|
<a-select v-model:value="contactForm.identityType" style="width: 100px; margin-right: 8px;">
|
||||||
|
<a-select-option v-for="item in dicsStore.dictOptions.CARD_TYPE" :key="item.dval" :value="item.dval">
|
||||||
|
{{ item.introduction }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
<a-input v-model:value="contactForm.identityNo" placeholder="请输入证件号码" style="flex: 1;"
|
||||||
|
@change="extractBirthDateFromIdCard" />
|
||||||
|
</span>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<!-- 出生日期 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="关系" name="relationType">
|
||||||
|
<a-input v-model:value="contactForm.relationType" placeholder="请输入关系" style="width: 100%;" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<!-- 关爱巡访电话 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="工作类型" name="workCondition">
|
||||||
|
<a-input v-model:value="contactForm.workCondition" placeholder="请输入工作类型" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<!-- 家庭地址 -->
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="家庭地址" name="areaCodes">
|
||||||
|
<AreaCascader v-model:value="contactForm.areaCodes" @change="onAreaChange" ref="areaCascaderRef" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="详细地址" name="address">
|
||||||
|
<a-input v-model:value="contactForm.address" placeholder="请输入详细地址" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-card>
|
||||||
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { message, Modal } from 'ant-design-vue'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import apis from '@/apis'
|
||||||
|
import { config } from '@/config'
|
||||||
|
import { usePagination } from '@/hooks'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { useDicsStore } from '@/store'
|
||||||
|
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||||
|
import { useForm, useModal } from '@/hooks'
|
||||||
|
const { formRecord, formData: contactForm, formRef, formRules, resetForm } = useForm()
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
defineOptions({
|
||||||
|
name: 'allocation',
|
||||||
|
})
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const visibleOpen = ref(false)
|
||||||
|
const dicsStore = useDicsStore()
|
||||||
|
formRules.value = {
|
||||||
|
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||||
|
}
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'serialNumber',
|
||||||
|
key: 'serialNumber',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '名字',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
},
|
||||||
|
|
||||||
|
// --- 联系方式 ---
|
||||||
|
{
|
||||||
|
title: '联系方式',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
key: 'phone',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关系',
|
||||||
|
dataIndex: 'relationType',
|
||||||
|
key: 'relationType',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '性别',
|
||||||
|
dataIndex: 'gender',
|
||||||
|
key: 'gender',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身份证号',
|
||||||
|
dataIndex: 'identityNo',
|
||||||
|
key: 'identityNo',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '紧急联系人',
|
||||||
|
dataIndex: 'isEmergency',
|
||||||
|
key: 'isEmergency',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '工作类型',
|
||||||
|
dataIndex: 'workCondition',
|
||||||
|
key: 'workCondition',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '家庭地址',
|
||||||
|
dataIndex: 'areaCodes',
|
||||||
|
key: 'areaCodes',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '详细地址',
|
||||||
|
dataIndex: 'address',
|
||||||
|
key: 'address',
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
key: 'action',
|
||||||
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const { t } = useI18n() // 解构出t方法
|
||||||
|
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
|
||||||
|
const editDialogRef = ref()
|
||||||
|
getPageList()
|
||||||
|
|
||||||
|
async function getPageList() {
|
||||||
|
try {
|
||||||
|
const { pageSize, current } = paginationState
|
||||||
|
const { success, data, total } = await apis.contacts
|
||||||
|
.getProjectList({
|
||||||
|
pageSize,
|
||||||
|
current: current,
|
||||||
|
customerId: props.formData.customerId
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
listData.value = data
|
||||||
|
paginationState.total = total || 0
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**核销 */
|
||||||
|
const checkHandler = (record) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '即将核销是否继续',
|
||||||
|
content: t('button.confirm'),
|
||||||
|
okText: t('button.confirm'),
|
||||||
|
onOk: async () => {
|
||||||
|
const params = {
|
||||||
|
...record,
|
||||||
|
status: 'success'
|
||||||
|
}
|
||||||
|
const { success } = await apis.productOrder.updateItem(params.id, params).catch(() => {
|
||||||
|
// throw new Error()
|
||||||
|
})
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
// resolve()
|
||||||
|
message.success('核销成功')
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
function handleDelete({ id }) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: t('pages.system.user.delTip'),
|
||||||
|
content: t('button.confirm'),
|
||||||
|
okText: t('button.confirm'),
|
||||||
|
onOk: () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
; (async () => {
|
||||||
|
try {
|
||||||
|
const { success } = await apis.productOrder.delItem(id).catch(() => {
|
||||||
|
throw new Error()
|
||||||
|
})
|
||||||
|
if (config('http.code.success') === success) {
|
||||||
|
resolve()
|
||||||
|
message.success(t('component.message.success.delete'))
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const showModal = () => {
|
||||||
|
visibleOpen.value = true;
|
||||||
|
};
|
||||||
|
function onAreaChange(value, labels) {
|
||||||
|
formData.value.areaLabels = [...labels]
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分页
|
||||||
|
*/
|
||||||
|
function onTableChange({ current, pageSize }) {
|
||||||
|
paginationState.current = current
|
||||||
|
paginationState.pageSize = pageSize
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
function handleSearch() {
|
||||||
|
resetPagination()
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function handleResetSearch() {
|
||||||
|
searchFormData.value = {}
|
||||||
|
resetPagination()
|
||||||
|
getPageList()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 编辑完成
|
||||||
|
*/
|
||||||
|
async function onOk() {
|
||||||
|
await getPageList()
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped></style>
|
||||||
|
|||||||
@ -14,7 +14,11 @@
|
|||||||
<a-input v-model:value="formData.name" placeholder="请输入姓名" />
|
<a-input v-model:value="formData.name" placeholder="请输入姓名" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="所在站点" name="stationId">
|
||||||
|
<ServiceStation v-model:value="formData.stationId" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<!-- 性别 -->
|
<!-- 性别 -->
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="性别" name="gender">
|
<a-form-item label="性别" name="gender">
|
||||||
@ -421,8 +425,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='16'>
|
<a-col :span='16'>
|
||||||
<a-form-item label="分类标签" name="labels">
|
<a-form-item label="分类标签" name="labelCodes">
|
||||||
<a-select v-model:value="formData.labels" allowClear mode="multiple"
|
<a-select v-model:value="formData.labelCodes" allowClear mode="multiple"
|
||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
|
v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
|
||||||
@ -478,6 +482,7 @@ import storage from '@/utils/storage'
|
|||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { FastBackwardFilled } from '@ant-design/icons-vue'
|
import { FastBackwardFilled } from '@ant-design/icons-vue'
|
||||||
import UploadInput from '@/components/Upload/UploadInput.vue'
|
import UploadInput from '@/components/Upload/UploadInput.vue'
|
||||||
|
import ServiceStation from '@/components/ServiceStation/index.vue'
|
||||||
const emit = defineEmits(['ok'])
|
const emit = defineEmits(['ok'])
|
||||||
const activeKey = ref('1')
|
const activeKey = ref('1')
|
||||||
const uploadedDocuments=ref([])
|
const uploadedDocuments=ref([])
|
||||||
@ -491,6 +496,7 @@ const isShow=ref(false)
|
|||||||
formRules.value = {
|
formRules.value = {
|
||||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||||
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
||||||
|
stationId:[{ required: true, message: '请选择所在站点', trigger: 'change' }],
|
||||||
identityNo: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
|
identityNo: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
|
||||||
contact1: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
|
contact1: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
|
||||||
archive: {
|
archive: {
|
||||||
@ -616,8 +622,7 @@ function handleOk() {
|
|||||||
showLoading()
|
showLoading()
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
|
labels: formData.value.labelCodes ? formData.value.labelCodes.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
|
||||||
|
|
||||||
}
|
}
|
||||||
params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : []
|
params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : []
|
||||||
params.archive.uploadedDocuments = uploadedDocuments.value && uploadedDocuments.value.length > 0 ? uploadedDocuments.value.map(item => spliceUrl(item)) : []
|
params.archive.uploadedDocuments = uploadedDocuments.value && uploadedDocuments.value.length > 0 ? uploadedDocuments.value.map(item => spliceUrl(item)) : []
|
||||||
@ -687,6 +692,7 @@ function handleGetLng(obj) {
|
|||||||
* 取消
|
* 取消
|
||||||
*/
|
*/
|
||||||
function handleCancel() {
|
function handleCancel() {
|
||||||
|
formData.value = {archive: {}}
|
||||||
hideModal()
|
hideModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,12 +13,8 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<!-- 性别 -->
|
<!-- 性别 -->
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="服务站点" name="stationId">
|
<a-form-item label="服务站点" name="stationName">
|
||||||
<a-select v-model:value="formData.stationId">
|
<a-input v-model:value="formData.stationName" placeholder="请输入服务站点" disabled/>
|
||||||
<a-select-option v-for="item in stationList" :key="item.id" :value="item.id">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 出生日期 -->
|
<!-- 出生日期 -->
|
||||||
@ -287,13 +283,15 @@ function handleCreate() {
|
|||||||
async function handleEdit(record = {}, type) {
|
async function handleEdit(record = {}, type) {
|
||||||
showModal({
|
showModal({
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '编辑对象'
|
title: type == '1' ? '线上工单' : '线下工单'
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
spining.value = true
|
spining.value = true
|
||||||
formData.value.orderType = type, //线下2 线上1]
|
formData.value.orderType = type, //线下2 线上1]
|
||||||
formData.value.customerId = record.id
|
formData.value.customerId = record.id
|
||||||
formData.value.name = record.name
|
formData.value.name = record.name
|
||||||
|
formData.value.stationName = record.stationName
|
||||||
|
formData.value.stationId = record.stationId
|
||||||
formData.value.areaCodes = [...record.archive.homeAreaCodes]
|
formData.value.areaCodes = [...record.archive.homeAreaCodes]
|
||||||
formData.value.areaLabels = record.archive.homeAreaLabels
|
formData.value.areaLabels = record.archive.homeAreaLabels
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
@ -72,10 +72,11 @@ formData.value = {}
|
|||||||
/**
|
/**
|
||||||
* 新建
|
* 新建
|
||||||
*/
|
*/
|
||||||
function handleCreate(id) {
|
function handleCreate(id,stationId) {
|
||||||
formData.value.directionType = 'Transfer'
|
formData.value.directionType = 'Transfer'
|
||||||
formData.value.direction = 'Out'
|
formData.value.direction = 'Out'
|
||||||
formData.value.customerId = id
|
formData.value.customerId = id
|
||||||
|
formData.value.stationId = stationId
|
||||||
|
|
||||||
showModal({
|
showModal({
|
||||||
type: 'create',
|
type: 'create',
|
||||||
@ -101,8 +102,6 @@ function handleOk() {
|
|||||||
}
|
}
|
||||||
if (params.directionType === 'Death') {
|
if (params.directionType === 'Death') {
|
||||||
params.passWayAt = dayjs(formData.value.passWayAt)
|
params.passWayAt = dayjs(formData.value.passWayAt)
|
||||||
} else {
|
|
||||||
formData.value.stationId = storage.local.getItem('stationId')
|
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 右侧 Tab 区域 -->
|
<!-- 右侧 Tab 区域 -->
|
||||||
<div style="padding: 20px;">
|
<div style="padding: 20px;">
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="handleTabChange">
|
<a-tabs v-model:activeKey="activeKey" @change="handleTabChange">
|
||||||
@ -32,10 +31,8 @@
|
|||||||
|
|
||||||
<!-- 动态组件 + keep-alive -->
|
<!-- 动态组件 + keep-alive -->
|
||||||
<div style="flex: 1; padding: 16px; overflow-y: auto;">
|
<div style="flex: 1; padding: 16px; overflow-y: auto;">
|
||||||
<keep-alive>
|
|
||||||
<component v-if="currentComponent" :is="currentComponent" ref="dynamicComponentRef"
|
<component v-if="currentComponent" :is="currentComponent" ref="dynamicComponentRef"
|
||||||
:key="tabsList[activeKey - 1]" :formData="formData" />
|
:key="tabsList[activeKey - 1]" :formData="formData" />
|
||||||
</keep-alive>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -116,6 +113,8 @@ const getDisabledPersonInfo = async () => {
|
|||||||
|
|
||||||
return { ceshi: '残疾人信息' };
|
return { ceshi: '残疾人信息' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Tab 切换时调用子组件方法
|
// Tab 切换时调用子组件方法
|
||||||
const handleTabChange = async (key) => {
|
const handleTabChange = async (key) => {
|
||||||
switch (tabsList[key - 1]) {
|
switch (tabsList[key - 1]) {
|
||||||
@ -126,7 +125,7 @@ const handleTabChange = async (key) => {
|
|||||||
formData.value = await getBasicInfo();
|
formData.value = await getBasicInfo();
|
||||||
break;
|
break;
|
||||||
case '联系人信息':
|
case '联系人信息':
|
||||||
formData.value = await getBasicInfo();
|
formData.value = { customerId: recordId.value };
|
||||||
break;
|
break;
|
||||||
case '附件':
|
case '附件':
|
||||||
case '病史信息':
|
case '病史信息':
|
||||||
|
|||||||
@ -299,9 +299,6 @@
|
|||||||
<template v-if="column.key === 'healthStatus'">
|
<template v-if="column.key === 'healthStatus'">
|
||||||
<span>{{ dicsStore.getDictLabel('Health_Condition', record.healthStatus) }}</span>
|
<span>{{ dicsStore.getDictLabel('Health_Condition', record.healthStatus) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'governmentPurchasedService'">
|
|
||||||
<span>{{ record.governmentPurchasedService ? '是' : '' }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.key === 'region'">
|
<template v-if="column.key === 'region'">
|
||||||
<span>{{ record.region && record.region.join('/') }}</span>
|
<span>{{ record.region && record.region.join('/') }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -343,7 +340,7 @@
|
|||||||
v-if="platForm !== 'yunying'">
|
v-if="platForm !== 'yunying'">
|
||||||
<span>线上工单</span>
|
<span>线上工单</span>
|
||||||
</x-action-button>
|
</x-action-button>
|
||||||
<x-action-button @click="$refs.transferRef.handleCreate(record.id)">
|
<x-action-button @click="$refs.transferRef.handleCreate(record.id,record.stationId)">
|
||||||
<span>转出</span>
|
<span>转出</span>
|
||||||
</x-action-button>
|
</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
@ -436,16 +433,18 @@ const columns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否政府购买服务',
|
title: '是否政府购买服务',
|
||||||
dataIndex: 'governmentPurchasedService',
|
dataIndex: 'archive.starGovernmentService',
|
||||||
key: 'governmentPurchasedService',
|
key: 'archive.starGovernmentService',
|
||||||
|
customRender: ({ record }) => record.archive?.starGovernmentService ? '是' : '否',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '服务对象分类',
|
title: '服务对象分类',
|
||||||
dataIndex: 'serviceRecipientCategory',
|
dataIndex: 'labels',
|
||||||
key: 'serviceRecipientCategory',
|
key: 'labels',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
customRender: ({ record }) => record?.labels?.join('/'),
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -652,7 +651,7 @@ async function getPageList() {
|
|||||||
if (config('http.code.success') === success) {
|
if (config('http.code.success') === success) {
|
||||||
listData.value = data
|
listData.value = data
|
||||||
paginationState.total = total
|
paginationState.total = total
|
||||||
totalCount.value = total
|
totalCount.value = total||0
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="所在机构" name="nodeType" required>
|
<a-form-item label="所在机构" name="organizationId" required>
|
||||||
<a-select v-model:value="formData.nodeType" :disabled="isViewMode">
|
<a-select v-model:value="formData.organizationId" :disabled="isViewMode">
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="item in nodeOptions"
|
v-for="item in nodeOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -302,7 +302,7 @@ const initFormData = () => ({
|
|||||||
id: undefined,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
parent_id: '',
|
parent_id: '',
|
||||||
nodeType: '',
|
organizationId: '',
|
||||||
code: '',
|
code: '',
|
||||||
type: '',
|
type: '',
|
||||||
manager: '',
|
manager: '',
|
||||||
@ -328,7 +328,7 @@ const initFormData = () => ({
|
|||||||
formData.value = initFormData()
|
formData.value = initFormData()
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
nodeType: [{ required: true, message: '请选择所在节点', trigger: 'change' }],
|
organizationId: [{ required: true, message: '请选择所在节点', trigger: 'change' }],
|
||||||
name: [{ required: true, message: '请输入站点名称', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入站点名称', trigger: 'blur' }],
|
||||||
code: [{ required: true, message: '请输入机构代码', trigger: 'blur' }],
|
code: [{ required: true, message: '请输入机构代码', trigger: 'blur' }],
|
||||||
type: [{ required: true, message: '请选择站点类型', trigger: 'change' }],
|
type: [{ required: true, message: '请选择站点类型', trigger: 'change' }],
|
||||||
@ -413,7 +413,7 @@ async function loadRecord(id, forView = false) {
|
|||||||
...initFormData(),
|
...initFormData(),
|
||||||
id: record.id,
|
id: record.id,
|
||||||
name: record.name || '',
|
name: record.name || '',
|
||||||
nodeType: org.name || '',
|
organizationId: org.organizationId || '',
|
||||||
code: org.orgCode || '',
|
code: org.orgCode || '',
|
||||||
type: stationTypeValue,
|
type: stationTypeValue,
|
||||||
manager: org.concatName || '',
|
manager: org.concatName || '',
|
||||||
@ -453,7 +453,7 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
Name: values.name,
|
Name: values.name,
|
||||||
OrganizationID: values.nodeType,
|
organizationId: values.organizationId,
|
||||||
OrgCode: values.code,
|
OrgCode: values.code,
|
||||||
StationType: (() => {
|
StationType: (() => {
|
||||||
const typeItem = dicsStore.dictOptions.Station_Type?.find(
|
const typeItem = dicsStore.dictOptions.Station_Type?.find(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user