From 970d42f2ea5a33edd932e4b76f62cb7ddd2c8cf5 Mon Sep 17 00:00:00 2001
From: "1378012178@qq.com" <1378012178@qq.com>
Date: Thu, 7 Aug 2025 16:24:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +
.env.development102 | 2 +
.env.development103 | 2 +
.env.production | 2 +
src/api/common/api.ts | 16 ++
.../components/ConfigServiceDirectiveForm.vue | 6 +-
.../components/ConfigServiceDirectiveList.vue | 22 +--
.../components/InstructionTagModal.vue | 14 +-
.../ConfigServiceCategory.api.ts | 29 ++--
.../ConfigServiceCategoryList.vue | 2 +-
.../components/ConfigServiceCategoryForm.vue | 2 +-
.../components/ConfigServiceCategoryModal.vue | 24 ++-
.../ConfigServiceDirective.api.ts | 9 ++
.../ConfigServiceDirectiveList.vue | 147 +++++++++++++-----
.../components/ConfigServiceDirectiveForm.vue | 36 +++--
.../ConfigServiceDirectiveModal.vue | 42 +++--
.../components/DirectiveRespositoryList.vue | 42 +++--
.../components/ConfigServiceDirectiveForm.vue | 6 +-
.../components/ConfigServiceDirectiveList.vue | 4 +-
.../serviceType/ConfigServiceType.api.ts | 10 +-
.../serviceType/ConfigServiceTypeList.vue | 6 +-
.../components/ConfigServiceTypeForm.vue | 4 +-
.../components/ConfigServiceTypeModal.vue | 33 +++-
23 files changed, 334 insertions(+), 128 deletions(-)
diff --git a/.env.development b/.env.development
index cb4013e..f8e1f53 100644
--- a/.env.development
+++ b/.env.development
@@ -20,6 +20,8 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8091'
+# 业务平台所在服务器nginx中静态资源media对应的路径 开头结尾都要带斜杠
+VITE_NGINX_MEDIA_LOCATION = '/media101/upFiles101/'
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
diff --git a/.env.development102 b/.env.development102
index 7e5d468..ebf1b42 100644
--- a/.env.development102
+++ b/.env.development102
@@ -20,6 +20,8 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
+# 业务平台所在服务器nginx中静态资源media对应的路径 开头结尾都要带斜杠
+VITE_NGINX_MEDIA_LOCATION = '/media102/upFiles102/'
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
diff --git a/.env.development103 b/.env.development103
index f7bf6b7..0df29c2 100644
--- a/.env.development103
+++ b/.env.development103
@@ -20,6 +20,8 @@ VITE_GLOB_API_URL_PREFIX=
#微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
+# 业务平台所在服务器nginx中静态资源media对应的路径 开头结尾都要带斜杠
+VITE_NGINX_MEDIA_LOCATION = '/media103/upFiles103/'
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
diff --git a/.env.production b/.env.production
index 3a10e4e..64fa3b8 100644
--- a/.env.production
+++ b/.env.production
@@ -21,6 +21,8 @@ VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit103
# 接口父路径前缀
VITE_GLOB_API_URL_PREFIX=
+# 业务平台所在服务器nginx中静态资源media对应的路径 开头结尾都要带斜杠
+VITE_NGINX_MEDIA_LOCATION = '/media103/upFiles103/'
# 填写后将作为乾坤子应用启动,主应用注册时AppName需保持一致(放开 VITE_GLOB_QIANKUN_MICRO_APP_NAME 参数表示jeecg-vue3将以乾坤子应用模式启动)
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
diff --git a/src/api/common/api.ts b/src/api/common/api.ts
index 98c8372..8d3f2ff 100644
--- a/src/api/common/api.ts
+++ b/src/api/common/api.ts
@@ -17,6 +17,8 @@ enum Api {
getCategoryData = '/sys/category/loadAllData',
getNuList = '/iot/tplink/cameraInfo/nuList',
getOrgInfo = '/sys/api/getOrgInfo',
+ getApiAddressByOrgCode = '/sys/api/getApiAddressByOrgCode',
+ getOrgUrlByOrgCode = '/sys/api/getOrgUrlByOrgCode',
}
/**
@@ -27,6 +29,20 @@ export const getNuList = (params) => {
return defHttp.get({ url: Api.getNuList, params });
};
+/**
+ * 获取机构对应api接口地址
+ * @param params
+ */
+export const getApiAddressByOrgCode = (params) => {
+ return defHttp.get({ url: Api.getApiAddressByOrgCode, params });
+};
+/**
+ * 获取机构对应协议域名
+ * @param params
+ */
+export const getOrgUrlByOrgCode = (params) => {
+ return defHttp.get({ url: Api.getOrgUrlByOrgCode, params });
+};
/**
* 上传父路径
*/
diff --git a/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue b/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue
index e53a75a..1e59e17 100644
--- a/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue
+++ b/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue
@@ -9,7 +9,7 @@
@@ -251,9 +251,9 @@ watch(
(newCategoryId) => {
if (!newCategoryId) {
formData.typeId = '';
- typeDictCode.value = 'nu_config_service_type,type_name,id,del_flag = 99 order by sort asc';
+ typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
- typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and category_id = '${newCategoryId}' order by sort asc`;
+ typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
diff --git a/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue b/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue
index 76ba106..25e296f 100644
--- a/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue
+++ b/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue
@@ -17,7 +17,7 @@
服务类别
@@ -25,8 +25,8 @@
服务类型
+ :dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = ${queryParam.categoryId || -1} order by sort asc`"
+ placeholder="请选择服务类型" :ignoreDisabled="true" allowClear />
@@ -160,9 +160,9 @@ function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
-function getInstructionName(record){
-console.log("🚀 ~ getInstructionName ~ record:", record)
-return "";
+function getInstructionName(record) {
+ console.log("🚀 ~ getInstructionName ~ record:", record)
+ return "";
}
/**
@@ -171,7 +171,7 @@ return "";
*/
function handleSelect(directive_) {
console.log("🚀 ~ handleSelect ~ directive_:", directive_)
- queryParam.instructionTagId =directive_.instructionTagId
+ queryParam.instructionTagId = directive_.instructionTagId
reload();
emit('addDirective', directive_)
}
@@ -258,10 +258,10 @@ function handleTags(prefix, tagList, suffix) {
}
}
function edit(record) {
-console.log("🚀 ~ edit ~ record:", record)
-directiveInfo.value = record
-console.log("🚀 ~ edit ~ directiveInfo:", directiveInfo)
-queryParam.instructionTagId = record.instructionTagId
+ console.log("🚀 ~ edit ~ record:", record)
+ directiveInfo.value = record
+ console.log("🚀 ~ edit ~ directiveInfo:", directiveInfo)
+ queryParam.instructionTagId = record.instructionTagId
}
defineExpose({
diff --git a/src/views/services/instructiontag/components/InstructionTagModal.vue b/src/views/services/instructiontag/components/InstructionTagModal.vue
index 82fdd9b..95ff5e7 100644
--- a/src/views/services/instructiontag/components/InstructionTagModal.vue
+++ b/src/views/services/instructiontag/components/InstructionTagModal.vue
@@ -77,18 +77,20 @@ function handleCancel() {
visible.value = false;
}
-function usingOrStop(id, izEnabled) {
+function usingOrStop(id, izEnabled,refresh = false) {
let params = {
id,
izEnabled
}
saveOrUpdate(params, true).then((res) => {
- if (res.success) {
- createMessage.success(res.message);
- } else {
- createMessage.warning(res.message);
+ if(refresh){
+ if (res.success) {
+ createMessage.success(res.message);
+ } else {
+ createMessage.warning(res.message);
+ }
+ emit('success')
}
- emit('success')
})
}
diff --git a/src/views/services/serviceCategory/ConfigServiceCategory.api.ts b/src/views/services/serviceCategory/ConfigServiceCategory.api.ts
index 0b2ee7d..b3d3e90 100644
--- a/src/views/services/serviceCategory/ConfigServiceCategory.api.ts
+++ b/src/views/services/serviceCategory/ConfigServiceCategory.api.ts
@@ -1,16 +1,17 @@
import { defHttp } from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
+import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage();
enum Api {
list = '/services/serviceCategory/configServiceCategory/list',
- save='/services/serviceCategory/configServiceCategory/add',
- edit='/services/serviceCategory/configServiceCategory/edit',
+ save = '/services/serviceCategory/configServiceCategory/add',
+ edit = '/services/serviceCategory/configServiceCategory/edit',
deleteOne = '/services/serviceCategory/configServiceCategory/delete',
deleteBatch = '/services/serviceCategory/configServiceCategory/deleteBatch',
importExcel = '/services/serviceCategory/configServiceCategory/importExcel',
exportXls = '/services/serviceCategory/configServiceCategory/exportXls',
+ useOrStopCascade = '/services/serviceCategory/configServiceCategory/useOrStopCascade',
}
/**
@@ -35,11 +36,11 @@ 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(() => {
+export const deleteOne = (params, handleSuccess) => {
+ return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
-}
+};
/**
* 批量删除
@@ -54,12 +55,12 @@ export const batchDelete = (params, handleSuccess) => {
okText: '确认',
cancelText: '取消',
onOk: () => {
- return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+ return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
- }
+ },
});
-}
+};
/**
* 保存或者更新
@@ -69,4 +70,12 @@ export const batchDelete = (params, handleSuccess) => {
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
-}
+};
+
+/**
+ * 启用/停用分类标签下所有服务类别
+ * @param params
+ */
+export const useOrStopCascade = (params) => {
+ return defHttp.post({ url: Api.useOrStopCascade, params });
+};
diff --git a/src/views/services/serviceCategory/ConfigServiceCategoryList.vue b/src/views/services/serviceCategory/ConfigServiceCategoryList.vue
index e0c4140..510ee32 100644
--- a/src/views/services/serviceCategory/ConfigServiceCategoryList.vue
+++ b/src/views/services/serviceCategory/ConfigServiceCategoryList.vue
@@ -9,7 +9,7 @@
分类标签
diff --git a/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue b/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue
index 2c16156..33c106c 100644
--- a/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue
+++ b/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue
@@ -9,7 +9,7 @@
diff --git a/src/views/services/serviceCategory/components/ConfigServiceCategoryModal.vue b/src/views/services/serviceCategory/components/ConfigServiceCategoryModal.vue
index 3e90126..718f316 100644
--- a/src/views/services/serviceCategory/components/ConfigServiceCategoryModal.vue
+++ b/src/views/services/serviceCategory/components/ConfigServiceCategoryModal.vue
@@ -22,7 +22,7 @@ import { ref, nextTick, defineExpose } from 'vue';
import ConfigServiceCategoryForm from './ConfigServiceCategoryForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
-import { saveOrUpdate } from '../ConfigServiceCategory.api';
+import { saveOrUpdate,useOrStopCascade } from '../ConfigServiceCategory.api';
const { createMessage } = useMessage();
const title = ref('');
@@ -77,7 +77,7 @@ function handleCancel() {
visible.value = false;
}
-function usingOrStop(id, izEnabled) {
+function usingOrStop(id, izEnabled,refresh = true) {
let params = {
id,
izEnabled
@@ -88,7 +88,24 @@ function usingOrStop(id, izEnabled) {
} else {
createMessage.warning(res.message);
}
- emit('success')
+ if(refresh){
+ emit('success')
+ }
+ })
+}
+
+function usingOrStopByCascade(instructionId, izEnabled,refresh = true) {
+ let params = {
+ instructionId,
+ izEnabled
+ }
+ useOrStopCascade(params).then((res) => {
+ if(refresh){
+ createMessage.success('操作成功');
+ emit('success')
+ }
+ }).catch(()=>{
+ createMessage.success('操作失败');
})
}
@@ -97,6 +114,7 @@ defineExpose({
edit,
disableSubmit,
usingOrStop,
+ usingOrStopByCascade,
});
diff --git a/src/views/services/serviceDirective/ConfigServiceDirective.api.ts b/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
index e85e95f..c0541d6 100644
--- a/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
+++ b/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
@@ -20,6 +20,7 @@ enum Api {
listByDS = '/services/serviceDirective/listByDS',
idListByDS = '/services/serviceDirective/idListByDS',
syncDirective = '/services/serviceDirective/syncDirective',
+ useOrStopCascade = '/services/serviceDirective/useOrStopCascade',
}
/**
@@ -133,3 +134,11 @@ export const syncMediaForAllBiz = (params) => {
export const syncDirective = (dataSourceCode: string, params: any) => {
return defHttp.post({ url: `${Api.syncDirective}?sourceOrgCode=${encodeURIComponent(dataSourceCode)}`, params });
};
+
+/**
+ * 启用/停用分类标签或服务类别或服务类型下所有服务指令
+ * @param params
+ */
+export const useOrStopCascade = (params) => {
+ return defHttp.post({ url: Api.useOrStopCascade, params });
+};
\ No newline at end of file
diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
index 05c6c8a..098d0b8 100644
--- a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
+++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
@@ -9,7 +9,7 @@
分类标签
@@ -18,7 +18,7 @@
服务类别
@@ -27,7 +27,7 @@
服务类型
-->
@@ -41,16 +41,16 @@
体型标签
+ :dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
+ :ignoreDisabled="true" placeholder="请选择体型标签" allowClear />
情绪标签
+ :dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
+ :ignoreDisabled="true" placeholder="请选择情绪标签" allowClear />
- { closeAllMenus(); item.action(data) }">
{{ item.label }}
@@ -288,8 +288,9 @@ import ConfigServiceCategoryModal from '/@/views/services/serviceCategory/compon
import ConfigServiceTypeModal from '/@/views/services/serviceType/components//ConfigServiceTypeModal.vue'
import { queryByKey } from '/@/views/admin/sysconfig/SysConfig.api'
import { getOrgInfo } from '@/api/common/api'
-import { CompassOutlined } from '@ant-design/icons-vue';
+import { useMessage } from '/@/hooks/web/useMessage';
+const { createMessage, createConfirm } = useMessage();
const insRegisterModal = ref();
const catRegisterModal = ref();
const typRegisterModal = ref();
@@ -798,11 +799,35 @@ function addInstruction() {
}
//启用分类标签
function usingInstruction(data) {
- insRegisterModal.value.usingOrStop(data.instructionId, '0')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时启用分类标签“' + data.title + '”下所有服务类别、服务类型、服务指令!' + '是否确认启用分类标签“' + data.title + '”!',
+ okText: '启用',
+ cancelText: '取消',
+ onOk: () => {
+ insRegisterModal.value.usingOrStop(data.instructionId, '0', false)
+ catRegisterModal.value.usingOrStopByCascade(data.instructionId, '0', false)
+ typRegisterModal.value.usingOrStopByCascade(data.instructionId, '', '0', false)
+ registerModal.value.usingOrStopByCascade(data.instructionId, '', '', '0', true)
+ }
+ });
}
//停用分类标签
function stopInstruction(data) {
- insRegisterModal.value.usingOrStop(data.instructionId, '1')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时停用分类标签“' + data.title + '”下所有服务类别、服务类型、服务指令!' + '是否确认停用分类标签“' + data.title + '”!',
+ okText: '停用',
+ cancelText: '取消',
+ onOk: () => {
+ insRegisterModal.value.usingOrStop(data.instructionId, '1', false)
+ catRegisterModal.value.usingOrStopByCascade(data.instructionId, '1', false)
+ typRegisterModal.value.usingOrStopByCascade(data.instructionId, '', '1', false)
+ registerModal.value.usingOrStopByCascade(data.instructionId, '', '', '1', true)
+ }
+ });
}
//新增服务类别
function addCategory(data) {
@@ -811,11 +836,33 @@ function addCategory(data) {
}
//启用服务类别
function usingCategory(data) {
- catRegisterModal.value.usingOrStop(data.categoryId, '0')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时启用服务类别“' + data.title + '”下所有服务类型、服务指令!' + '是否确认启用服务类别“' + data.title + '”!',
+ okText: '启用',
+ cancelText: '取消',
+ onOk: () => {
+ catRegisterModal.value.usingOrStop(data.categoryId, '0', false)
+ typRegisterModal.value.usingOrStopByCascade('', data.categoryId, '0', false)
+ registerModal.value.usingOrStopByCascade('', data.categoryId, '', '0', true)
+ }
+ });
}
//停用服务类别
function stopCategory(data) {
- catRegisterModal.value.usingOrStop(data.categoryId, '1')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时停用服务类别“' + data.title + '”下所有服务类型、服务指令!' + '是否确认停用服务类别“' + data.title + '”!',
+ okText: '停用',
+ cancelText: '取消',
+ onOk: () => {
+ catRegisterModal.value.usingOrStop(data.categoryId, '1', false)
+ typRegisterModal.value.usingOrStopByCascade('', data.categoryId, '1', false)
+ registerModal.value.usingOrStopByCascade('', data.categoryId, '', '1', true)
+ }
+ });
}
//新增服务类型
function addType(data) {
@@ -824,11 +871,31 @@ function addType(data) {
}
//启用服务类型
function usingType(data) {
- typRegisterModal.value.usingOrStop(data.typeId, '0')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时启用服务类型“' + data.title + '”下所有服务指令!' + '是否确认启用服务类型“' + data.title + '”!',
+ okText: '启用',
+ cancelText: '取消',
+ onOk: () => {
+ typRegisterModal.value.usingOrStop(data.typeId, '0', false)
+ registerModal.value.usingOrStopByCascade('', '', data.typeId, '0', true)
+ }
+ });
}
//停用服务类型
function stopType(data) {
- typRegisterModal.value.usingOrStop(data.typeId, '1')
+ createConfirm({
+ iconType: 'warning',
+ title: '操作确认',
+ content: '此操作会同时停用服务类型“' + data.title + '”下所有服务指令!' + '是否确认停用服务类型“' + data.title + '”!',
+ okText: '停用',
+ cancelText: '取消',
+ onOk: () => {
+ typRegisterModal.value.usingOrStop(data.typeId, '1', false)
+ registerModal.value.usingOrStopByCascade('', '', data.typeId, '1', true)
+ }
+ });
}
//新增服务指令
function addDirective(data) {
@@ -850,11 +917,11 @@ function editMedia(data) {
}
//启用服务指令
function usingDirective(data) {
- registerModal.value.usingOrStop(data.key, '0');
+ registerModal.value.usingOrStop(data.key, '0', true);
}
//停用服务指令
function stopDirective(data) {
- registerModal.value.usingOrStop(data.key, '1');
+ registerModal.value.usingOrStop(data.key, '1', true);
}
//查看体型标签
function bodyTagsDetail(data) {
@@ -868,64 +935,64 @@ function emotionTagsDetail(data) {
function menuItems(data) {
if (data.level === 1) {
const items = [
- { key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', action: addInstruction },
+ { key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', canAdd: true, action: addInstruction },
]
if (data.canAdd) {
- items.push({ key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', action: addCategory })
+ items.push({ key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addCategory })
}
if (data.izEnabled === '1') {
- items.push({ key: 'usingIns', label: '启用分类标签', icon: 'ant-design:check-circle-outlined', action: usingInstruction })
+ items.push({ key: 'usingIns', label: '启用分类标签', icon: 'ant-design:check-circle-outlined', canAdd: true, action: usingInstruction })
} else if (data.izEnabled === '0') {
- items.push({ key: 'stopIns', label: '停用分类标签', icon: 'ant-design:stop-outlined', action: stopInstruction })
+ items.push({ key: 'stopIns', label: '停用分类标签', icon: 'ant-design:stop-outlined', canAdd: true, action: stopInstruction })
}
return items
}
else if (data.level === 2) {
const items = [
- { key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', action: addCategory },
+ { key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addCategory },
]
if (data.canAdd) {
- items.push({ key: 'addTyp', label: '新增服务类型', icon: 'ant-design:plus-outlined', action: addType })
+ items.push({ key: 'addTyp', label: '新增服务类型', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addType })
}
if (data.izEnabled === '1') {
- items.push({ key: 'usingCat', label: '启用服务类别', icon: 'ant-design:check-circle-outlined', action: usingCategory })
+ items.push({ key: 'usingCat', label: '启用服务类别', icon: 'ant-design:check-circle-outlined', canAdd: data.canAdd, action: usingCategory })
} else if (data.izEnabled === '0') {
- items.push({ key: 'stopCat', label: '停用服务类别', icon: 'ant-design:stop-outlined', action: stopCategory })
+ items.push({ key: 'stopCat', label: '停用服务类别', icon: 'ant-design:stop-outlined', canAdd: data.canAdd, action: stopCategory })
}
return items
}
else if (data.level === 3) {
const items = [
- { key: 'addTyp', label: '新增服务类型', icon: 'ant-design:plus-outlined', action: addType },
+ { key: 'addTyp', label: '新增服务类型', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addType },
]
if (data.canAdd) {
- items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', action: addDirective })
+ items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addDirective })
}
if (data.izEnabled === '1') {
- items.push({ key: 'usingTyp', label: '启用服务类型', icon: 'ant-design:check-circle-outlined', action: usingType })
+ items.push({ key: 'usingTyp', label: '启用服务类型', icon: 'ant-design:check-circle-outlined', canAdd: data.canAdd, action: usingType })
} else if (data.izEnabled === '0') {
- items.push({ key: 'stopTyp', label: '停用服务类型', icon: 'ant-design:stop-outlined', action: stopType })
+ items.push({ key: 'stopTyp', label: '停用服务类型', icon: 'ant-design:stop-outlined', canAdd: data.canAdd, action: stopType })
}
return items
}
else if (data.level === 4) {
const items = [
- { key: 'editDir', label: '编辑服务指令', icon: 'ant-design:edit-outlined', action: editDirective },
- { key: 'editMedia', label: '编辑指令资源', icon: 'ant-design:edit-outlined', action: editMedia },
+ { 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 },
]
// if (data.canAdd) {
- // items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', action: addDirective })
+ // items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', canAdd: data.canAdd , action: addDirective })
// }
if (data.izEnabled === '1') {
- items.push({ key: 'usingDir', label: '启用服务指令', icon: 'ant-design:check-circle-outlined', action: usingDirective })
+ items.push({ key: 'usingDir', label: '启用服务指令', icon: 'ant-design:check-circle-outlined', canAdd: data.canAdd, action: usingDirective })
} else if (data.izEnabled === '0') {
- items.push({ key: 'stopDir', label: '停用服务指令', icon: 'ant-design:stop-outlined', action: stopDirective })
+ items.push({ key: 'stopDir', label: '停用服务指令', icon: 'ant-design:stop-outlined', canAdd: data.canAdd, action: stopDirective })
}
if (data?.bodyTagList?.length > 0) {
- items.push({ key: 'bodyTagsDetail', label: '查看体型标签', icon: 'ant-design:stop-outlined', action: bodyTagsDetail })
+ items.push({ key: 'bodyTagsDetail', label: '查看体型标签', icon: 'ant-design:stop-outlined', canAdd: true, action: bodyTagsDetail })
}
if (data?.emotionTagList?.length > 0) {
- items.push({ key: 'emotionTagsDetail', label: '查看情绪标签', icon: 'ant-design:stop-outlined', action: emotionTagsDetail })
+ items.push({ key: 'emotionTagsDetail', label: '查看情绪标签', icon: 'ant-design:stop-outlined', canAdd: true, action: emotionTagsDetail })
}
return items
}
@@ -935,9 +1002,9 @@ function menuItems(data) {
// 递归取每级第一个 key
function setDefaultExpanded(nodes: any[]) {
- expandedKeys.value.push(nodes[0].key)
- expandedKeys.value.push(nodes[0]?.children?.[0]?.key)
- expandedKeys.value.push(nodes[0]?.children?.[0]?.children?.[0]?.key)
+ // expandedKeys.value.push(nodes[0].key)
+ // expandedKeys.value.push(nodes[0]?.children?.[0]?.key)
+ // expandedKeys.value.push(nodes[0]?.children?.[0]?.children?.[0]?.key)
}
const treeLoading = ref(false)
diff --git a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
index 2bc8f5a..47cb086 100644
--- a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
+++ b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
@@ -9,7 +9,7 @@
@@ -107,8 +107,11 @@
暂无文件
-
-
+
+
+
@@ -142,7 +145,8 @@
@@ -154,7 +158,8 @@
@@ -163,11 +168,16 @@
暂无文件
+
+
暂无文件
-
-
+
+
+
@@ -190,6 +200,7 @@ import { saveOrUpdate, syncMediaForBiz, syncMediaForAllBiz } from '../ConfigServ
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
+import { env } from 'process';
const onPriceKeydown = (e: KeyboardEvent) => {
const key = e.key;
@@ -213,6 +224,7 @@ const props = defineProps({
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
mainOrgCode: '',
+ mediaApiAddress: '',//指令资源请求地址
});
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`)
@@ -256,6 +268,7 @@ const instructionTagName = ref('')
const categoryName = ref('')
const typeName = ref('')
const cycleTypeName = ref('')
+const mediaPath = ref(import.meta.env.VITE_NGINX_MEDIA_LOCATION)
//表单验证
const validatorRules = reactive({
categoryId: [{ required: true, message: '请选择服务类别!' },],
@@ -393,7 +406,7 @@ watch(
if (!newInstructionTagId) {
categoryDictCode.value = 'nu_config_service_category,category_name,id,1=2';
} else {
- categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`;
+ categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`;
}
}
);
@@ -405,9 +418,9 @@ watch(
formData.cycleType = ''
}
if (!newCategoryId) {
- typeDictCode.value = 'nu_config_service_type,type_name,id,del_flag = 99 order by sort asc';
+ typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
- typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and category_id = '${newCategoryId}' order by sort asc`;
+ typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
@@ -565,6 +578,9 @@ function syncMediaForAllBizFunc() {
});
}
+onMounted(() => {
+
+})
defineExpose({
add,
diff --git a/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue b/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
index e8ec0ef..8d65777 100644
--- a/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
+++ b/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
@@ -19,7 +19,8 @@
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
+ :formBpm="false" :mainOrgCode="mainOrgCode" :mediaApiAddress="opeType == 'dmlook' ? mediaApiAddress : ''">
+
关闭
@@ -40,7 +41,7 @@
-->
+ :footer-style="{ textAlign: 'right' }" @close="handleCancelDM" :maskClosable="true">
@@ -56,7 +57,7 @@ import { ref, nextTick, defineExpose, defineProps } from 'vue';
import ConfigServiceDirectiveForm from './ConfigServiceDirectiveForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
-import { saveOrUpdate, queryById, syncDirective } from '../ConfigServiceDirective.api';
+import { saveOrUpdate, useOrStopCascade, queryById, syncDirective } from '../ConfigServiceDirective.api';
import DirectiveRespositoryList from './DirectiveRespositoryList.vue'
import { clearCache } from '/@/utils/cache/cacheUtil'
@@ -65,13 +66,14 @@ const dmRef = ref()
const loading = ref(false)
const { createMessage, createConfirm } = useMessage();
const props = defineProps({
+ mediaApiAddress: '',//指令资源请求地址
});
const title = ref('');
const visible = ref(false);
const disableSubmit = ref(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
-const opeType = ref('')//操作类型 add新增 edit编辑 editMedia主列表-指令资源 look详情 audit审核 auditMedia审核列表-指令资源
+const opeType = ref('')//操作类型 add新增 edit编辑 editMedia主列表-指令资源 look详情 dmlook指令库查看指令详情 audit审核 auditMedia审核列表-指令资源
const dmVisible = ref(false)
function handleCancelDM() {
@@ -176,18 +178,20 @@ function handleCancel() {
visible.value = false;
}
-function usingOrStop(id, izEnabled) {
+function usingOrStop(id, izEnabled, refresh = false) {
let params = {
id,
izEnabled
}
saveOrUpdate(params, true).then((res) => {
- if (res.success) {
- createMessage.success(res.message);
- } else {
- createMessage.warning(res.message);
+ if (refresh) {
+ if (res.success) {
+ createMessage.success(res.message);
+ } else {
+ createMessage.warning(res.message);
+ }
+ emit('success')
}
- emit('success')
})
}
@@ -232,12 +236,30 @@ function handlePullDM() {
});
}
+function usingOrStopByCascade(instructionTagId, categoryId, typeId, izEnabled, refresh = true) {
+ let params = {
+ instructionTagId,
+ categoryId,
+ typeId,
+ izEnabled
+ }
+ useOrStopCascade(params).then((res) => {
+ if (refresh) {
+ createMessage.success('操作成功');
+ emit('success')
+ }
+ }).catch(() => {
+ createMessage.success('操作失败');
+ })
+}
+
defineExpose({
add,
edit,
editMedia,
disableSubmit,
usingOrStop,
+ usingOrStopByCascade,
queryByIdFunc,
opeType,
queryAndEditMedia,
diff --git a/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue b/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
index 9bc9b36..84aa1d0 100644
--- a/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
+++ b/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
@@ -9,7 +9,7 @@
分类标签
@@ -18,7 +18,7 @@
服务类别
@@ -27,7 +27,7 @@
服务类型
@@ -41,25 +41,25 @@
体型标签
+ :dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
+ :ignoreDisabled="true" placeholder="请选择体型标签" allowClear />
情绪标签
+ :dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`"
+ :ignoreDisabled="true" placeholder="请选择情绪标签" allowClear />
-
+
@@ -87,7 +87,8 @@
-
+
@@ -102,10 +103,13 @@ import ConfigServiceDirectiveModal from './ConfigServiceDirectiveModal.vue'
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { cloneDeep } from "lodash-es";
+import { getOrgInfo, getOrgUrlByOrgCode } from '@/api/common/api'
const props = defineProps({
mainOrgCode: '',
});
+const mediaApiAddress = ref()//指令库资源请求地址
+const orgName = ref('')
const formRef = ref();
const queryParam = reactive({
instructionTagId: '',
@@ -150,7 +154,9 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
beforeFetch: async (params) => {
// let res = await idListByDS({ dataSourceCode: 'master' })
params.dataSourceCode = props.mainOrgCode
- params.excludeIds = excludeIds.value.join(',')
+ if (excludeIds.value.length) {
+ params.excludeIds = excludeIds.value.join(',')
+ }
params.izEnabled = '0'
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
@@ -171,11 +177,11 @@ const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
- xxl: 4
+ xxl: 5
});
const wrapperCol = reactive({
xs: 24,
- sm: 20,
+ sm: 19,
});
/**
@@ -183,9 +189,9 @@ const wrapperCol = reactive({
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
- registerModal.value.opeType = 'look';
+ registerModal.value.opeType = 'dmlook';
record.orgCode_ = props.mainOrgCode
- registerModal.value.edit(record, false, false);
+ registerModal.value.edit(record, false, true);
}
@@ -312,6 +318,12 @@ function getSelectedIds() {
// 添加音频结束监听
onMounted(() => {
+ getOrgInfo().then(res => {
+ orgName.value = res.orgName
+ })
+ getOrgUrlByOrgCode({ orgCode: props.mainOrgCode }).then(res => {
+ mediaApiAddress.value = res.url
+ })
});
defineExpose({
diff --git a/src/views/services/serviceTag/components/ConfigServiceDirectiveForm.vue b/src/views/services/serviceTag/components/ConfigServiceDirectiveForm.vue
index a16068d..f046df0 100644
--- a/src/views/services/serviceTag/components/ConfigServiceDirectiveForm.vue
+++ b/src/views/services/serviceTag/components/ConfigServiceDirectiveForm.vue
@@ -9,7 +9,7 @@
@@ -258,9 +258,9 @@ watch(
(newCategoryId) => {
if (!newCategoryId) {
formData.typeId = '';
- typeDictCode.value = 'nu_config_service_type,type_name,id,del_flag = 99 order by sort asc';
+ typeDictCode.value = 'nu_config_service_type,type_name,id,1=2';
} else {
- typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and category_id = '${newCategoryId}' order by sort asc`;
+ typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`;
}
}
);
diff --git a/src/views/services/serviceTag/components/ConfigServiceDirectiveList.vue b/src/views/services/serviceTag/components/ConfigServiceDirectiveList.vue
index f73bc1a..ba95dbf 100644
--- a/src/views/services/serviceTag/components/ConfigServiceDirectiveList.vue
+++ b/src/views/services/serviceTag/components/ConfigServiceDirectiveList.vue
@@ -9,7 +9,7 @@
服务类别
@@ -17,7 +17,7 @@
服务类型
diff --git a/src/views/services/serviceType/ConfigServiceType.api.ts b/src/views/services/serviceType/ConfigServiceType.api.ts
index a191b84..f8e9dfe 100644
--- a/src/views/services/serviceType/ConfigServiceType.api.ts
+++ b/src/views/services/serviceType/ConfigServiceType.api.ts
@@ -10,7 +10,8 @@ enum Api {
deleteOne = '/services/ServiceType/configServiceType/delete',
deleteBatch = '/services/ServiceType/configServiceType/deleteBatch',
importExcel = '/services/ServiceType/configServiceType/importExcel',
- exportXls = '/services/ServiceType/configServiceType/exportXls'
+ exportXls = '/services/ServiceType/configServiceType/exportXls',
+ useOrStopCascade='/services/ServiceType/configServiceType/useOrStopCascade',
}
/**
@@ -72,3 +73,10 @@ export const saveOrUpdate = (params, isUpdate) => {
}
+/**
+ * 启用/停用分类标签或服务类别下所有服务类型
+ * @param params
+ */
+export const useOrStopCascade = (params) => {
+ return defHttp.post({ url: Api.useOrStopCascade, params });
+};
diff --git a/src/views/services/serviceType/ConfigServiceTypeList.vue b/src/views/services/serviceType/ConfigServiceTypeList.vue
index 38a83ff..1b6370d 100644
--- a/src/views/services/serviceType/ConfigServiceTypeList.vue
+++ b/src/views/services/serviceType/ConfigServiceTypeList.vue
@@ -141,12 +141,12 @@ const wrapperCol = reactive({
});
// 计算 dictCode
-const instructionDictCode = 'nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 order by sort asc';
+const instructionDictCode = 'nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc';
const categoryDictCode = computed(() => {
if (!queryParam.instructionId) {
- return 'nu_config_service_category,category_name,id,del_flag = 0';
+ return 'nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0';
}
- return `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = ${queryParam.instructionId} order by sort asc`;
+ return `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = ${queryParam.instructionId} order by sort asc`;
});
// 监听 instructionId 变化,清空二级
diff --git a/src/views/services/serviceType/components/ConfigServiceTypeForm.vue b/src/views/services/serviceType/components/ConfigServiceTypeForm.vue
index 21a712a..0f173ac 100644
--- a/src/views/services/serviceType/components/ConfigServiceTypeForm.vue
+++ b/src/views/services/serviceType/components/ConfigServiceTypeForm.vue
@@ -9,7 +9,7 @@
@@ -92,7 +92,7 @@ const categoryDictCode = computed(() => {
if (!formData.instructionId) {
return 'nu_config_service_category,category_name,id,1=2';
}
- return `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = '${formData.instructionId}' order by sort asc`;
+ return `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${formData.instructionId}' order by sort asc`;
});
// 监听 instructionId 变化,清空 categoryId
diff --git a/src/views/services/serviceType/components/ConfigServiceTypeModal.vue b/src/views/services/serviceType/components/ConfigServiceTypeModal.vue
index 236a472..11da388 100644
--- a/src/views/services/serviceType/components/ConfigServiceTypeModal.vue
+++ b/src/views/services/serviceType/components/ConfigServiceTypeModal.vue
@@ -20,7 +20,7 @@ import { ref, nextTick, defineExpose } from 'vue';
import ConfigServiceTypeForm from './ConfigServiceTypeForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
-import { saveOrUpdate } from '../ConfigServiceType.api';
+import { saveOrUpdate ,useOrStopCascade } from '../ConfigServiceType.api';
const { createMessage } = useMessage();
const title = ref('');
@@ -76,18 +76,36 @@ function handleCancel() {
visible.value = false;
}
-function usingOrStop(id, izEnabled) {
+function usingOrStop(id, izEnabled,refresh = true) {
let params = {
id,
izEnabled
}
saveOrUpdate(params, true).then((res) => {
- if (res.success) {
- createMessage.success(res.message);
- } else {
- createMessage.warning(res.message);
+ if(refresh){
+ if (res.success) {
+ createMessage.success(res.message);
+ } else {
+ createMessage.warning(res.message);
+ }
+ emit('success')
}
- emit('success')
+ })
+}
+
+function usingOrStopByCascade(instructionId,categoryId, izEnabled,refresh = true) {
+ let params = {
+ instructionId,
+ categoryId,
+ izEnabled
+ }
+ useOrStopCascade(params).then((res) => {
+ if(refresh){
+ createMessage.success('操作成功');
+ emit('success')
+ }
+ }).catch(()=>{
+ createMessage.success('操作失败');
})
}
@@ -96,6 +114,7 @@ defineExpose({
edit,
disableSubmit,
usingOrStop,
+ usingOrStopByCascade,
});