parent
f43c01795f
commit
ef68213d91
|
|
@ -6,19 +6,19 @@ VITE_PUBLIC_PATH = /
|
|||
|
||||
|
||||
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
||||
VITE_PROXY = [["/nursing-unit_101","http://localhost:8091/nursing-unit_101"],["/upload","http://localhost:3300/upload"]]
|
||||
VITE_PROXY = [["/nursing-unit_102","http://localhost:8092/nursing-unit_102"],["/upload","http://localhost:3300/upload"]]
|
||||
|
||||
#后台接口全路径地址(必填)
|
||||
VITE_GLOB_DOMAIN_URL=http://localhost:8091/nursing-unit_101
|
||||
VITE_GLOB_DOMAIN_URL=http://localhost:8092/nursing-unit_102
|
||||
|
||||
#后台接口父地址(必填)
|
||||
VITE_GLOB_API_URL=/nursing-unit_101
|
||||
VITE_GLOB_API_URL=/nursing-unit_102
|
||||
|
||||
# 接口前缀
|
||||
VITE_GLOB_API_URL_PREFIX=
|
||||
|
||||
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
|
||||
VITE_APP_SUB_jeecg-app-1 = '//localhost:8091'
|
||||
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
|
||||
|
||||
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
|
||||
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
|
||||
|
|
|
|||
|
|
@ -6,19 +6,19 @@ VITE_PUBLIC_PATH = /
|
|||
|
||||
|
||||
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
||||
VITE_PROXY = [["/nursing-unit_102","http://localhost:8092/nursing-unit_102"],["/upload","http://localhost:3300/upload"]]
|
||||
VITE_PROXY = [["/nursing-unit_101","http://localhost:8091/nursing-unit_101"],["/upload","http://localhost:3300/upload"]]
|
||||
|
||||
#后台接口全路径地址(必填)
|
||||
VITE_GLOB_DOMAIN_URL=http://localhost:8092/nursing-unit_102
|
||||
VITE_GLOB_DOMAIN_URL=http://localhost:8091/nursing-unit_101
|
||||
|
||||
#后台接口父地址(必填)
|
||||
VITE_GLOB_API_URL=/nursing-unit_102
|
||||
VITE_GLOB_API_URL=/nursing-unit_101
|
||||
|
||||
# 接口前缀
|
||||
VITE_GLOB_API_URL_PREFIX=
|
||||
|
||||
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
|
||||
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
|
||||
VITE_APP_SUB_jeecg-app-1 = '//localhost:8091'
|
||||
|
||||
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
|
||||
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
VITE_USE_MOCK = false
|
||||
|
||||
# 发布路径
|
||||
VITE_PUBLIC_PATH = /biz101
|
||||
VITE_PUBLIC_PATH = /biz103
|
||||
|
||||
# 是否启用gzip或brotli压缩
|
||||
# 选项值: gzip | brotli | none
|
||||
|
|
@ -13,10 +13,10 @@ VITE_BUILD_COMPRESS = 'gzip'
|
|||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
||||
|
||||
#后台接口父地址(必填)
|
||||
VITE_GLOB_API_URL=/nursingunit101
|
||||
VITE_GLOB_API_URL=/nursingunit103
|
||||
|
||||
#后台接口全路径地址(必填)
|
||||
VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit101
|
||||
VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit103
|
||||
|
||||
# 接口父路径前缀
|
||||
VITE_GLOB_API_URL_PREFIX=
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
align: 'center',
|
||||
dataIndex: 'describe',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="type">
|
||||
<template #label><span title="标签类型">标签类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.type" dictCode="elder_tag_type" placeholder="请选择标签类型"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
<j-dict-select-tag v-model:value="queryParam.type" :dictCode="`nu_elder_tag_type,type_name,id`"
|
||||
placeholder="请选择标签类型" allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
<a-input v-model:value="formData.tagName" placeholder="请输入标签名称" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="说明" v-bind="validateInfos.describ" id="ElderTagForm-tagName" name="tagName">
|
||||
<a-textarea v-model:value="formData.describ" placeholder="请输入说明" :maxlength="200" :rows="3"
|
||||
:autosize="{ minRows: 3 }" :showCount="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="价格(元)" v-bind="validateInfos.price" id="ElderTagForm-price" name="price">
|
||||
<a-input-number v-model:value="formData.price" placeholder="请输入价格" style="width: 100%" :min="0"
|
||||
|
|
@ -58,6 +64,7 @@ const formData = reactive<Record<string, any>>({
|
|||
price: undefined,
|
||||
createTime: '',
|
||||
sysOrgCode: '',
|
||||
describ:'',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
align: 'center',
|
||||
dataIndex: 'describ',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="type">
|
||||
<template #label><span title="标签类型">标签类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.type" dictCode="elder_tag_type" placeholder="请选择标签类型"
|
||||
<j-dict-select-tag v-model:value="queryParam.type" :dictCode="`nu_elder_tag_type,type_name,id`" placeholder="请选择标签类型"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -43,6 +43,8 @@
|
|||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'eldertag:nu_elder_tag:add'" @click="handleAdd"
|
||||
preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" @click="handleEditMain" preIcon="ant-design:setting-outlined"> 标签管理</a-button>
|
||||
<a-button type="primary" @click="handleEditRep" preIcon="ant-design:plus-outlined"> 引用</a-button>
|
||||
<a-button type="primary" class="btnPrivate" @click="handleDirectiveMainOpen" v-show="isShowETM"
|
||||
preIcon="ant-design:profile-outlined">标准标签库</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:eye-outlined" v-show="ownOrgCode == mainOrgCode"
|
||||
|
|
@ -60,6 +62,25 @@
|
|||
<!-- 表单区域 -->
|
||||
<ElderTagModal ref="registerModal" @success="handleSuccess"></ElderTagModal>
|
||||
|
||||
<!-- 标签管理 -->
|
||||
<a-drawer title="标签管理" width="80vw" :open="tagMainManagOpen" @close="onTagMainManagClose"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onTagMainManagClose" style="margin-right: 10px;">关闭</a-button>
|
||||
</template>
|
||||
<ElderTagMainList ref="tagMainManagRef"> </ElderTagMainList>
|
||||
</a-drawer>
|
||||
|
||||
<!-- 引用 -->
|
||||
<a-drawer title="引用" width="80vw" :open="tagMainRepOpen" @close="onTagMainRepClose"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onTagMainRepClose" style="margin-right: 10px;">关闭</a-button>
|
||||
<a-button type="primary" @click="onTagMainRepUse" style="margin-right: 10px;">引用</a-button>
|
||||
</template>
|
||||
<ElderTagMainRes ref="tagMainRepRef"> </ElderTagMainRes>
|
||||
</a-drawer>
|
||||
|
||||
<!-- 差异标签 -->
|
||||
<a-drawer v-model:visible="newElderTagVisible" title="差异标签" width="85vw" :footer-style="{ textAlign: 'right' }"
|
||||
:bodyStyle="{ padding: '14px', height: '80vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
|
||||
|
|
@ -102,7 +123,13 @@ import { getOrgInfo } from '@/api/common/api'
|
|||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import CanAddElderTagList from '/@/views/elder/canaddet/CanAddElderTagList.vue'
|
||||
import CompareElderTagList from './components/CompareElderTagList.vue'
|
||||
import ElderTagMainList from '/@/views/elder/eldertagmain/ElderTagMainList.vue'
|
||||
import ElderTagMainRes from '/@/views/elder/eldertagmain/ElderTagMainRes.vue'
|
||||
|
||||
const tagMainManagOpen = ref(false)
|
||||
const tagMainManagRef = ref()
|
||||
const tagMainRepOpen = ref(false)
|
||||
const tagMainRepRef = ref()
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
|
|
@ -134,6 +161,11 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
// column: 'sort',
|
||||
// order: 'asc',
|
||||
// },
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 15,
|
||||
pageSizeOptions: ['15', '50', '70', '100'],
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
|
|
@ -307,6 +339,41 @@ function onCompareListClose() {
|
|||
compareListOpen.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签管理关闭
|
||||
*/
|
||||
function onTagMainManagClose() {
|
||||
tagMainManagOpen.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签管理打开
|
||||
*/
|
||||
function handleEditMain() {
|
||||
tagMainManagOpen.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签管理仓库关闭
|
||||
*/
|
||||
function onTagMainRepClose() {
|
||||
tagMainRepOpen.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 引用
|
||||
*/
|
||||
function onTagMainRepUse() {
|
||||
tagMainRepRef.value.useAll()
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签管理仓库打开
|
||||
*/
|
||||
function handleEditRep() {
|
||||
tagMainRepOpen.value = true
|
||||
}
|
||||
|
||||
// 添加音频结束监听
|
||||
onMounted(() => {
|
||||
getElderTagMainOrgCode()
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
align: 'center',
|
||||
dataIndex: 'describ',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@
|
|||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="标签类型" v-bind="validateInfos.type" id="ElderTagForm-type" name="type">
|
||||
<j-dict-select-tag v-model:value="formData.type" dictCode="elder_tag_type" placeholder="请选择标签类型"
|
||||
allowClear :ignoreDisabled="true" :disabled="!!formData.id" />
|
||||
<j-dict-select-tag v-model:value="formData.type"
|
||||
:dictCode="`nu_elder_tag_type,type_name,id, iz_enabled = 0 `" placeholder="请选择标签类型" allowClear
|
||||
:disabled="!!formData.id" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
@ -16,6 +17,12 @@
|
|||
:disabled="!!formData.id"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="说明" v-bind="validateInfos.describ" id="ElderTagForm-tagName" name="tagName">
|
||||
<a-textarea v-model:value="formData.describ" placeholder="请输入说明" :maxlength="200" :rows="3"
|
||||
:autosize="{ minRows: 3 }" :showCount="true" :disabled="!!formData.id" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="价格(元)" v-bind="validateInfos.price" id="ElderTagForm-price" name="price">
|
||||
<a-input-number v-model:value="formData.price" placeholder="请输入价格" style="width: 100%" :min="0"
|
||||
|
|
@ -27,7 +34,7 @@
|
|||
<span v-if="disabled && !formData.pic">暂无文件</span>
|
||||
<JImageUpload v-else-if="opeType == 'dmlook'" :fileMax="1" :value="mediaApiAddress + formData.pic">
|
||||
</JImageUpload>
|
||||
<JImageUpload v-else :fileMax="1" v-model:value="formData.pic"></JImageUpload>
|
||||
<JImageUpload v-else :fileMax="1" v-model:value="formData.pic" :disabled="!!formData.id"></JImageUpload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24">
|
||||
|
|
@ -94,6 +101,7 @@ const formData = reactive<Record<string, any>>({
|
|||
pic: '',
|
||||
sort: 99,
|
||||
izEnabled: '0',
|
||||
describ: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<ElderTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"
|
||||
:mediaApiAddress="mediaApiAddress" :opeType="opeType"></ElderTagForm>
|
||||
</a-drawer>
|
||||
<a-drawer :title="'标准指令库'" width="80vw" v-model:visible="etmVisible" :closable="true"
|
||||
<a-drawer :title="'标准标签库'" width="80vw" v-model:visible="etmVisible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancelETM" :maskClosable="true">
|
||||
<a-spin :spinning="loading">
|
||||
<ElderTagRespositoryList ref="etmRef" :mainOrgCode="mainOrgCode"></ElderTagRespositoryList>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/elder/elderTagMain/list',
|
||||
save='/elder/elderTagMain/add',
|
||||
batchAdd='/elder/elderTagMain/batchAdd',
|
||||
edit='/elder/elderTagMain/edit',
|
||||
deleteOne = '/elder/elderTagMain/delete',
|
||||
deleteBatch = '/elder/elderTagMain/deleteBatch',
|
||||
importExcel = '/elder/elderTagMain/importExcel',
|
||||
exportXls = '/elder/elderTagMain/exportXls',
|
||||
listByDS = '/elder/elderTagMain/listByDS',
|
||||
idListByDS = '/elder/elderTagMain/idListByDS',
|
||||
syncElderTag = '/elder/elderTagMain/syncElderTag',
|
||||
compareList = '/elder/elderTagMain/compareList',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出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
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const batchAdd = (params) => {
|
||||
return defHttp.post({ url: Api.batchAdd, params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口 - 变更数据源
|
||||
* @param params
|
||||
*/
|
||||
export const listByDS = (params) => defHttp.get({ url: Api.listByDS, params });
|
||||
|
||||
/**
|
||||
*
|
||||
* @param params 获取对应机构已有长者标签id
|
||||
* @returns
|
||||
*/
|
||||
export const idListByDS = (params) => defHttp.get({ url: Api.idListByDS, params });
|
||||
|
||||
/**
|
||||
* 同步
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export const syncElderTag = (dataSourceCode: string, params: any) => {
|
||||
return defHttp.post({ url: `${Api.syncElderTag}?sourceOrgCode=${encodeURIComponent(dataSourceCode)}`, params });
|
||||
};
|
||||
|
||||
/**
|
||||
* 差异数据对比
|
||||
* @param params compareOrgCode
|
||||
* @returns
|
||||
*/
|
||||
export const compareList = (params) => defHttp.get({ url: Api.compareList, params });
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
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: 'typeId_dictText',
|
||||
},
|
||||
{
|
||||
title: '标签名称',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
align: 'center',
|
||||
dataIndex: 'describ',
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
align: 'center',
|
||||
dataIndex: 'pic',
|
||||
customRender: render.renderImage,
|
||||
},
|
||||
// {
|
||||
// title: '排序',
|
||||
// align: 'center',
|
||||
// dataIndex: 'sort',
|
||||
// },
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
type: { title: '标签类型', order: 0, view: 'text', type: 'string' },
|
||||
tagName: { title: '标签名称', order: 1, view: 'text', type: 'string' },
|
||||
price: { title: '价格', order: 2, view: 'number', type: 'number' },
|
||||
pic: { title: '图标', order: 3, view: 'text', type: 'string' },
|
||||
sort: { title: '排序', order: 4, view: 'number', type: 'number' },
|
||||
izEnabled: { title: '是否启用', order: 5, view: 'text', type: 'string' },
|
||||
};
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<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="typeId">
|
||||
<template #label><span title="标签类型">标签类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.typeId" :dictCode="`nu_elder_tag_type,type_name,id`"
|
||||
placeholder="请选择标签类型" allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="tagName">
|
||||
<template #label><span title="标签名称">标签名称</span></template>
|
||||
<JInput v-model:value="queryParam.tagName" placeholder="请输入标签名称" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.izEnabled"
|
||||
dictCode="iz_enabled" allow-clear />
|
||||
</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="handleAddType" preIcon="ant-design:setting-outlined"> 标签类型管理</a-button>
|
||||
<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>
|
||||
<!-- 表单区域 -->
|
||||
<ElderTagMainModal ref="registerModal" @success="handleSuccess"></ElderTagMainModal>
|
||||
|
||||
<!-- 标签类型管理 -->
|
||||
<a-drawer title="标签类型管理" width="50vw" :open="tagTypeOpen" @close="onTagTypeClose"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onTagTypeClose" style="margin-right: 10px;">关闭</a-button>
|
||||
</template>
|
||||
<ElderTagTypeList ref="tagTypeRef"> </ElderTagTypeList>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="eldertag-elderTagMain" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ElderTagMain.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ElderTagMain.api';
|
||||
import ElderTagMainModal from './components/ElderTagMainModal.vue'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import ElderTagTypeList from '/@/views/elder/eldertagtype/ElderTagTypeList.vue'
|
||||
|
||||
const tagTypeOpen = ref(false)
|
||||
const tagTypeRef = ref()
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '长者标签',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
// defSort: {
|
||||
// column: 'sort',
|
||||
// order: 'asc',
|
||||
// },
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 15,
|
||||
pageSizeOptions: ['15', '50', '70', '100'],
|
||||
},
|
||||
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: 5,
|
||||
xxl: 5
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.opeType = 'add';
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.opeType = 'edit';
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.opeType = 'look';
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// }
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleAddType() {
|
||||
tagTypeOpen.value = true
|
||||
}
|
||||
function onTagTypeClose() {
|
||||
tagTypeOpen.value = false
|
||||
}
|
||||
|
||||
// 添加音频结束监听
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
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: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<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="typeId">
|
||||
<template #label><span title="标签类型">标签类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.typeId" :dictCode="`nu_elder_tag_type,type_name,id`"
|
||||
placeholder="请选择标签类型" allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="tagName">
|
||||
<template #label><span title="标签名称">标签名称</span></template>
|
||||
<JInput v-model:value="queryParam.tagName" placeholder="请输入标签名称" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.izEnabled"
|
||||
dictCode="iz_enabled" allow-clear />
|
||||
</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" :rowSelection="rowSelection" >
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ElderTagMainModal ref="registerModal" @success="handleSuccess"></ElderTagMainModal>
|
||||
|
||||
<!-- 标签类型管理 -->
|
||||
<a-drawer title="标签类型管理" width="50vw" :open="tagTypeOpen" @close="onTagTypeClose"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onTagTypeClose" style="margin-right: 10px;">关闭</a-button>
|
||||
</template>
|
||||
<ElderTagTypeList ref="tagTypeRef"> </ElderTagTypeList>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="eldertag-elderTagMain" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ElderTagMain.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,batchAdd } from './ElderTagMain.api';
|
||||
import ElderTagMainModal from './components/ElderTagMainModal.vue'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import ElderTagTypeList from '/@/views/elder/eldertagtype/ElderTagTypeList.vue'
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const {createMessage} = useMessage()
|
||||
const tagTypeOpen = ref(false)
|
||||
const tagTypeRef = ref()
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '长者标签',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn:false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
// defSort: {
|
||||
// column: 'sort',
|
||||
// order: 'asc',
|
||||
// },
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 15,
|
||||
pageSizeOptions: ['15', '50', '70', '100'],
|
||||
},
|
||||
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: 5,
|
||||
xxl: 5
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.opeType = 'add';
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.opeType = 'edit';
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.opeType = 'look';
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
// {
|
||||
// label: '编辑',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// },
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// }
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleAddType() {
|
||||
tagTypeOpen.value = true
|
||||
}
|
||||
function onTagTypeClose() {
|
||||
tagTypeOpen.value = false
|
||||
}
|
||||
//引用
|
||||
function useAll(){
|
||||
if(!rowSelection.selectedRows.length){
|
||||
createMessage.warning('未选择长者标签');
|
||||
return
|
||||
}
|
||||
batchAdd(rowSelection.selectedRows)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
useAll,
|
||||
});
|
||||
|
||||
// 添加音频结束监听
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
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: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ElderTagForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="标签类型" v-bind="validateInfos.typeId" id="ElderTagForm-typeId" name="typeId">
|
||||
<j-dict-select-tag v-model:value="formData.typeId"
|
||||
:dictCode="`nu_elder_tag_type,type_name,id, iz_enabled = 0 `" placeholder="请选择标签类型" allowClear
|
||||
:disabled="!!formData.id" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="标签名称" v-bind="validateInfos.tagName" id="ElderTagForm-tagName" name="tagName">
|
||||
<a-input v-model:value="formData.tagName" placeholder="请输入标签名称" allow-clear
|
||||
:disabled="!!formData.id"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="说明" v-bind="validateInfos.describ" id="ElderTagForm-tagName" name="tagName">
|
||||
<a-textarea v-model:value="formData.describ" placeholder="请输入说明" :maxlength="200" :rows="3"
|
||||
:autosize="{ minRows: 3 }" :showCount="true" :disabled="!!formData.id" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24">
|
||||
<a-form-item label="价格(元)" v-bind="validateInfos.price" id="ElderTagForm-price" name="price">
|
||||
<a-input-number v-model:value="formData.price" placeholder="请输入价格" style="width: 100%" :min="0"
|
||||
:max="99.99" :precision="2" @keydown="onPriceKeydown" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="图标" v-bind="validateInfos.pic" id="ElderTagForm-pic" name="pic">
|
||||
<span v-if="disabled && !formData.pic">暂无文件</span>
|
||||
<JImageUpload v-else-if="opeType == 'dmlook'" :fileMax="1" :value="mediaApiAddress + formData.pic">
|
||||
</JImageUpload>
|
||||
<JImageUpload v-else :fileMax="1" v-model:value="formData.pic" :disabled="!!formData.id"></JImageUpload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24">
|
||||
<a-form-item label="排序" v-bind="validateInfos.sort" id="ElderTagForm-sort" name="sort">
|
||||
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ElderTagForm-izEnabled" name="izEnabled">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ElderTagMain.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true },
|
||||
mediaApiAddress: '',//指令资源请求地址
|
||||
opeType: 'look',
|
||||
});
|
||||
const onPriceKeydown = (e: KeyboardEvent) => {
|
||||
const key = e.key;
|
||||
// 放行控制键
|
||||
if (['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab'].includes(key)) return;
|
||||
// 只能输数字和点
|
||||
if (!/[\d.]/.test(key)) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
const input = e.target as HTMLInputElement;
|
||||
const { value, selectionStart: s, selectionEnd: t } = input;
|
||||
const next = value.slice(0, s!) + key + value.slice(t!);
|
||||
// 整数最多2位,小数最多2位
|
||||
if (!/^\d{0,2}(?:\.\d{0,2})?$/.test(next)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
typeId: '',
|
||||
tagName: '',
|
||||
price: 0,
|
||||
pic: '',
|
||||
sort: 99,
|
||||
izEnabled: '0',
|
||||
describ: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
typeId: [{ required: true, message: '请输入标签类型!' },],
|
||||
tagName: [{ required: true, message: '请输入标签名称!' },],
|
||||
izEnabled: [{ required: true, message: '请输入是否启用!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<template>
|
||||
<a-drawer :title="title" width="50vw" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @cancel="handleCancel">
|
||||
<template #footer>
|
||||
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
|
||||
<a-button @click="handleOk" v-show="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
<ElderTagMainForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"
|
||||
:mediaApiAddress="mediaApiAddress" :opeType="opeType"></ElderTagMainForm>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ElderTagMainForm from './ElderTagMainForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import { clearCache } from '/@/utils/cache/cacheUtil'
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const props = defineProps({
|
||||
mediaApiAddress: '',//指令资源请求地址
|
||||
});
|
||||
const mainOrgCode = ref('')
|
||||
const etmRef = ref()
|
||||
const title = ref<string>('');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const etmVisible = ref(false)
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const loading = ref(false)
|
||||
const opeType = ref('')
|
||||
|
||||
function handleCancelETM() {
|
||||
etmVisible.value = false
|
||||
clearCache()
|
||||
emit('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;
|
||||
}
|
||||
|
||||
function openETM(orgCode) {
|
||||
etmVisible.value = true
|
||||
mainOrgCode.value = orgCode
|
||||
nextTick(() => {
|
||||
etmRef.value?.init()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
openETM,
|
||||
opeType,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/elder/elderTagType/list',
|
||||
save='/elder/elderTagType/add',
|
||||
edit='/elder/elderTagType/edit',
|
||||
deleteOne = '/elder/elderTagType/delete',
|
||||
deleteBatch = '/elder/elderTagType/deleteBatch',
|
||||
importExcel = '/elder/elderTagType/importExcel',
|
||||
exportXls = '/elder/elderTagType/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出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 });
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
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: 'typeName'
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: "center",
|
||||
dataIndex: 'izEnabled_dictText'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
tagName: {title: '标签名称',order: 0,view: 'text', type: 'string',},
|
||||
izEnabled: {title: '是否启用',order: 1,view: 'list', type: 'string',dictCode: 'iz_enabled',},
|
||||
};
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--引用表格-->
|
||||
<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)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ElderTagTypeModal ref="registerModal" @success="handleSuccess"></ElderTagTypeModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="eldertagtype-elderTagType" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ElderTagType.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ElderTagType.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ElderTagTypeModal from './components/ElderTagTypeModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
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>
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="ElderTagTypeForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="标签类型名称" v-bind="validateInfos.typeName" id="ElderTagTypeForm-typeName"
|
||||
name="typeName">
|
||||
<a-input v-model:value="formData.typeName" placeholder="请输入标签类型名称" allow-clear
|
||||
:disabled="!!formData.id"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ElderTagForm-izEnabled" name="izEnabled">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ElderTagType.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
typeName: '',
|
||||
izEnabled: '0',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
typeName: [{ required: true, message: '请输入标签类型名称!' },],
|
||||
izEnabled: [{ required: true, message: '请输入是否启用!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ElderTagTypeForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ElderTagTypeForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ElderTagTypeForm from './ElderTagTypeForm.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>
|
||||
|
|
@ -448,8 +448,8 @@
|
|||
<AbnormalDirectiveList ref="abnormalListRef" v-if="abnormalListOpen"></AbnormalDirectiveList>
|
||||
</a-drawer>
|
||||
|
||||
<!-- 新增指令 -->
|
||||
<a-drawer v-model:visible="newDirectiveVisible" title="新增指令" width="85vw" :footer-style="{ textAlign: 'right' }"
|
||||
<!-- 差异指令 -->
|
||||
<a-drawer v-model:visible="newDirectiveVisible" title="差异指令" width="85vw" :footer-style="{ textAlign: 'right' }"
|
||||
:bodyStyle="{ height: '80vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
|
||||
wrapClassName="org-list-modal" @cancel="handleCancelNewDirective">
|
||||
<template #footer>
|
||||
|
|
@ -1240,7 +1240,7 @@ function menuItems(data) {
|
|||
else if (data.level === 4) {
|
||||
const items = [
|
||||
{ key: 'editDir', label: '编辑服务指令', icon: 'ant-design:edit-outlined', canAdd: data.canAdd && data.izEnabled == '0', action: editDirective },
|
||||
{ key: 'editMedia', label: '编辑指令资源', icon: 'ant-design:edit-outlined', canAdd: data.canAdd && data.izEnabled == '0', action: editMedia },
|
||||
{ key: 'editMedia', label: '编辑指令资源', icon: 'ant-design:edit-outlined', canAdd: data.canAdd && data.izEnabled == '0' && mainOrgCode.value == ownOrgCode.value, action: editMedia },
|
||||
]
|
||||
// if (data.canAdd) {
|
||||
// items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', canAdd: data.canAdd , action: addDirective })
|
||||
|
|
|
|||
Loading…
Reference in New Issue