护理流程模板功能
This commit is contained in:
parent
43d7f36fe9
commit
04a4b2322f
Binary file not shown.
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 16 KiB |
|
|
@ -0,0 +1,93 @@
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/services/nuBizCustomerCareTempMain/list',
|
||||||
|
save = '/services/nuBizCustomerCareTempMain/add',
|
||||||
|
edit = '/services/nuBizCustomerCareTempMain/edit',
|
||||||
|
deleteOne = '/services/nuBizCustomerCareTempMain/delete',
|
||||||
|
deleteBatch = '/services/nuBizCustomerCareTempMain/deleteBatch',
|
||||||
|
importExcel = '/services/nuBizCustomerCareTempMain/importExcel',
|
||||||
|
exportXls = '/services/nuBizCustomerCareTempMain/exportXls',
|
||||||
|
queryDirectivesApi = '/nuIpadApi/nuConfigServiceCategory/getServiceTree',
|
||||||
|
queryPackagelistApi = '/nuIpadApi/nuBizNuCustomerServer/getNcPackagelist',
|
||||||
|
queryNclist = '/services/nuBizCustomerCareTempMain/getNclist',
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params, handleSuccess) => {
|
||||||
|
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
* @param isUpdate
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有服务指令
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const queryDirectivesApi = () => defHttp.get({ url: Api.queryDirectivesApi });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有指令包
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const queryPackagelistApi = () => defHttp.get({ url: Api.queryPackagelistApi });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询对应已编排指令
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const queryNclist = (params) => defHttp.get({ url: Api.queryNclist, params });
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建人',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'createBy_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'createTime'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
//指令模板数据
|
||||||
|
export const tempColumns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '主表id nu_biz_customer_care_temp_main.id',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'pkId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务类别id',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'categoryId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务类别名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'categoryName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务类型id',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'typeId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务类型名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'typeName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务指令id',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'directiveId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务指令名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'directiveName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务指令图片大图',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'previewFile'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务指令图片小图',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'previewFileSmall'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '即时指令图片',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'immediateFile'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '即时指令焦点图片',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'immediateFileFocus'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '周期类型ID',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'cycleTypeId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '周期类型',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'cycleType'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '周期值',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'cycleValue'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务时长(分钟)',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'serviceDuration'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '横向定位',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'positioning'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '纵向定位',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'positioningLong'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务标签名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tagName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开始时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'startTime'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '结束时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'endTime'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否是服务指令包 0否 1是',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'izPackage'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<!--查询区域-->
|
||||||
|
<div class="jeecg-basic-table-form-container">
|
||||||
|
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||||
|
:wrapper-col="wrapperCol">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :lg="6">
|
||||||
|
<a-form-item name="name">
|
||||||
|
<template #label><span title="名称">名称</span></template>
|
||||||
|
<JInput v-model:value="queryParam.name" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
|
<a-col :lg="6">
|
||||||
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||||
|
style="margin-left: 8px">重置</a-button>
|
||||||
|
</a-col>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" />
|
||||||
|
</template>
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<NuBizCustomerCareTempModal ref="registerModal" @success="handleSuccess"></NuBizCustomerCareTempModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="customercaretemp-nuBizCustomerCareTemp" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { columns, superQuerySchema } from './NuBizCustomerCareTemp.data';
|
||||||
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuBizCustomerCareTemp.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import NuBizCustomerCareTempModal from './components/NuBizCustomerCareTempModal.vue'
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
const registerModal = ref();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '服务指令模版主表',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize: false,
|
||||||
|
useSearchForm: false,
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
beforeFetch: async (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name: "服务指令模版主表",
|
||||||
|
url: getExportUrl,
|
||||||
|
params: queryParam,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
|
const labelCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 4,
|
||||||
|
xl: 6,
|
||||||
|
xxl: 4
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 20,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.add();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.edit(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record: Recordable) {
|
||||||
|
registerModal.value.disableSubmit = true;
|
||||||
|
registerModal.value.edit(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '预览',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
//刷新数据
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.jeecg-basic-table-form-container {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.table-page-search-submitButtons {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-group-cust {
|
||||||
|
min-width: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-group-split-cust {
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-form-item:not(.ant-form-item-with-help) {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-picker),
|
||||||
|
:deep(.ant-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,83 @@
|
||||||
|
<template>
|
||||||
|
<a-drawer :title="title" width="100vw" :visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
|
||||||
|
:bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||||
|
<template #footer>
|
||||||
|
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||||
|
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||||
|
</template>
|
||||||
|
<NuBizCustomerCareTempForm v-if="visible" ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit"
|
||||||
|
:formBpm="false"></NuBizCustomerCareTempForm>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import NuBizCustomerCareTempForm from './NuBizCustomerCareTempForm.vue'
|
||||||
|
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<number>(800);
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const disableSubmit = ref<boolean>(false);
|
||||||
|
const registerForm = ref();
|
||||||
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
title.value = '新增';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.add();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.edit(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
disableSubmit,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
/**隐藏样式-modal确定按钮 */
|
||||||
|
.jee-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="less" scoped></style>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in New Issue