From 771ee9e3b20b4285e1d7b9eb576e2a25dc19430a Mon Sep 17 00:00:00 2001
From: "1378012178@qq.com" <1378012178@qq.com>
Date: Fri, 19 Dec 2025 10:09:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=AB=AF=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E6=8C=87=E4=BB=A4=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4=EF=BC=9A?=
=?UTF-8?q?=20=091=EF=BC=89=E5=8E=BB=E9=99=A4=E6=A0=87=E5=87=86=E6=8C=87?=
=?UTF-8?q?=E4=BB=A4=E5=BA=93=E3=80=81=E5=B7=AE=E5=BC=82=E6=AF=94=E5=AF=B9?=
=?UTF-8?q?=E3=80=81=E5=B7=AE=E5=BC=82=E6=8C=87=E4=BB=A4=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=20=092=EF=BC=89=E5=8E=BB=E9=99=A4=E6=89=80=E6=9C=89=E6=A0=87?=
=?UTF-8?q?=E5=87=86=E6=8C=87=E4=BB=A4=E5=BA=93=E6=A6=82=E5=BF=B5=E5=85=88?=
=?UTF-8?q?=E5=85=B3=E6=93=8D=E4=BD=9C=E5=8F=8A=E4=BB=A3=E7=A0=81=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=20=093=EF=BC=89=E4=BB=BB=E4=B8=80=E6=9C=BA=E6=9E=84?=
=?UTF-8?q?=E5=9D=87=E5=8F=AF=E5=88=9B=E5=BB=BA=E4=BB=BB=E6=84=8F=E5=88=86?=
=?UTF-8?q?=E7=B1=BB=E6=A0=87=E7=AD=BE=E3=80=81=E6=9C=8D=E5=8A=A1=E7=B1=BB?=
=?UTF-8?q?=E5=88=AB=E3=80=81=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=9E=8B=E3=80=81?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4=E4=BB=A5=E5=8F=8A=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E4=BB=BB=E6=84=8F=E5=AD=97=E6=AE=B5=20=094=EF=BC=89?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=95=9C=E5=83=8F=E7=A0=81=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=9A=E6=9C=AA=E7=94=9F=E6=88=90=E9=95=9C?=
=?UTF-8?q?=E5=83=8F=E7=A0=81=E6=9C=BA=E6=9E=84=E8=87=AA=E5=8A=A8=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E9=95=9C=E5=83=8F=E7=A0=81=EF=BC=8C=E5=8F=AF=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E9=95=9C=E5=83=8F=E7=A0=81=EF=BC=8C=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=E5=90=8E=E6=97=A7=E7=9A=84=E9=95=9C=E5=83=8F=E7=A0=81=E5=B0=86?=
=?UTF-8?q?=E5=A4=B1=E6=95=88=EF=BC=9B=E5=8F=AF=E9=80=9A=E8=BF=87=E5=A4=8D?=
=?UTF-8?q?=E5=88=B6=E6=8C=89=E9=92=AE=E5=BF=AB=E9=80=9F=E5=A4=8D=E5=88=B6?=
=?UTF-8?q?=E9=95=9C=E5=83=8F=E7=A0=81=20=095=EF=BC=89=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4=E5=BA=93=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=9A=E9=9C=80=E8=A6=81=E5=85=88=E8=BE=93=E5=85=A5=E5=91=A8?=
=?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=95=9C=E5=83=8F=E7=A0=81=E5=90=8E?=
=?UTF-8?q?=EF=BC=8C=E5=8F=AF=E6=9F=A5=E7=9C=8B=E5=AF=B9=E5=BA=94=E6=9C=BA?=
=?UTF-8?q?=E6=9E=84=E6=89=80=E6=9C=89=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4?=
=?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=8F=AF=E2=80=9C=E9=95=9C=E5=83=8F=E2=80=9D?=
=?UTF-8?q?=E5=88=B0=E6=9C=AC=E6=9C=BA=E6=9E=84=E4=B8=AD=EF=BC=8C=E5=A6=82?=
=?UTF-8?q?=E6=9E=9C=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE=E3=80=81=E6=9C=8D?=
=?UTF-8?q?=E5=8A=A1=E7=B1=BB=E5=88=AB=E3=80=81=E6=9C=8D=E5=8A=A1=E7=B1=BB?=
=?UTF-8?q?=E5=9E=8B=E3=80=81=E6=9C=8D=E5=8A=A1=E5=90=8D=E7=A7=B0=E6=B1=89?=
=?UTF-8?q?=E5=AD=97=E5=AE=8C=E5=85=A8=E4=B8=80=E8=87=B4=EF=BC=8C=E5=88=99?=
=?UTF-8?q?=E8=AE=A4=E5=AE=9A=E4=B8=BA=E5=90=8C=E4=B8=80=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E6=8C=87=E4=BB=A4=EF=BC=8C=E4=B8=8D=E4=BC=9A=E9=87=8D=E5=A4=8D?=
=?UTF-8?q?=E9=95=9C=E5=83=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ConfigServiceDirective.api.ts | 28 +-
.../ConfigServiceDirectiveList.vue | 477 +++---------------
.../components/ConfigServiceDirectiveForm.vue | 30 +-
.../ConfigServiceDirectiveModal.vue | 73 +--
.../components/DirectiveRespositoryList.vue | 212 ++++----
5 files changed, 246 insertions(+), 574 deletions(-)
diff --git a/src/views/services/serviceDirective/ConfigServiceDirective.api.ts b/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
index 2edfbaf..1e7fe56 100644
--- a/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
+++ b/src/views/services/serviceDirective/ConfigServiceDirective.api.ts
@@ -23,6 +23,9 @@ enum Api {
syncDirective = '/services/serviceDirective/syncDirective',
useOrStopCascade = '/services/serviceDirective/useOrStopCascade',
compareList = '/services/serviceDirective/compareList',
+ getSyncCode = '/services/serviceDirective/getSyncCode',
+ updateSyncCode = '/services/serviceDirective/updateSyncCode',
+ getOrgCodeBySyncCode = '/services/serviceDirective/getOrgCodeBySyncCode',
}
/**
@@ -155,6 +158,27 @@ export const useOrStopCascade = (params) => {
/**
* 差异数据对比
* @param params compareOrgCode
- * @returns
+ * @returns
*/
-export const compareList = (params) => defHttp.get({ url: Api.compareList, params });
\ No newline at end of file
+export const compareList = (params) => defHttp.get({ url: Api.compareList, params });
+
+/**
+ * 获取镜像码
+ * @param params
+ * @returns
+ */
+export const getSyncCode = (params) => defHttp.get({ url: Api.getSyncCode, params }, { isTransformResponse: false });
+
+/**
+ * 更新镜像码
+ * @param params
+ * @returns
+ */
+export const updateSyncCode = (params) => defHttp.get({ url: Api.updateSyncCode, params }, { isTransformResponse: false });
+
+/**
+ * 根据镜像码获取机构编码
+ * @param params
+ * @returns
+ */
+export const getOrgCodeBySyncCode = (params) => defHttp.get({ url: Api.getOrgCodeBySyncCode, params }, { isTransformResponse: false });
\ No newline at end of file
diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
index f2bc170..b14d0b4 100644
--- a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
+++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
@@ -34,14 +34,9 @@
-
-
新增分类标签
+ preIcon="ant-design:plus-outlined">新增分类标签
@@ -77,7 +72,6 @@
-
{{ childFour?.title + '(' + childFour?.cycleTypeName + ')' }}
(已停用)
-
+
@@ -157,7 +151,7 @@
{{ itemMenu.label }}
-
+
@@ -253,40 +247,8 @@
-
-
-
-
-
-
@@ -294,25 +256,10 @@
-
-
-
- 标准指令库
- 差异比对
- 差异指令
-
+ 镜像码管理
+ 服务指令库
@@ -324,38 +271,6 @@
无文件
播放
-
-
-
无文件
播放
@@ -371,12 +286,10 @@
-
-
+
@@ -404,31 +317,6 @@
-
-
-
-
-
-
-
-
- 关闭
-
-
-
-
-
@@ -462,6 +350,28 @@
+
+
+
+ 关闭
+
+
+
+
+
+ 镜像码:{{ syncCode }}
+
+
+ 复制
+ 更新
+
+
+
+
+
+
@@ -491,24 +401,18 @@ import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ConfigServiceDirective.data';
-import { list, batchAdd, deleteOne, batchDelete, getImportUrl, getExportUrl, tree } from './ConfigServiceDirective.api';
+import { list, batchAdd, deleteOne, batchDelete, getImportUrl, getExportUrl, tree, getSyncCode, updateSyncCode } from './ConfigServiceDirective.api';
import ConfigServiceDirectiveModal from './components/ConfigServiceDirectiveModal.vue'
-import { useUserStore } from '/@/store/modules/user';
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 ConfigServiceCategoryList from '../serviceCategory/ConfigServiceCategoryList.vue';
import InstructionTag from '../instructiontag/InstructionTag.vue';
import ConfigServiceTypeList from '../serviceType/ConfigServiceTypeList.vue';
-import BodyTagList from '/@/views/services/directivetag/bodytag/BodyTagList.vue';
-import EmotionTagList from '/@/views/services/directivetag/emotiontag/EmotionTagList.vue';
-import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { Empty } from 'ant-design-vue';
import InstructionTagModal from '/@/views/services/InstructionTag/components/InstructionTagModal.vue'
import ConfigServiceCategoryModal from '/@/views/services/serviceCategory/components//ConfigServiceCategoryModal.vue'
import ConfigServiceTypeModal from '/@/views/services/serviceType/components//ConfigServiceTypeModal.vue'
import DirectiveMediaList from '/@/views/services/directivemedia/DirectiveMediaList.vue'
-import { queryByKey } from '/@/views/admin/sysconfig/SysConfig.api'
import { getOrgInfo } from '@/api/common/api'
import { useMessage } from '/@/hooks/web/useMessage';
import AbnormalDirectiveList from './components/AbnormalDirectiveList.vue'
@@ -531,8 +435,8 @@ const dmRef = ref()
const abnormalListOpen = ref(false)
const abnormalListRef = ref()
const newDirectiveVisible = ref(false)
-const compareListRef = ref()
const compareListOpen = ref(false)
+const syncCodeVisible = ref(false)
const queryParam = reactive({
instructionTagId: '',
categoryId: '',
@@ -554,11 +458,8 @@ watch(
queryParam.typeId = ''
}
)
-const toggleSearchStatus = ref(false);
const registerModal = ref();
const treeData = ref([]);
-const userStore = useUserStore();
-const isShowDM = ref(false)//是否展示指令库功能
const selectedKeys = ref([]);
const openKeys = ref([]);
//注册table数据
@@ -609,65 +510,16 @@ const wrapperCol = reactive({
sm: 20,
});
-// 高级查询配置
-const superQueryConfig = reactive(superQuerySchema);
-
const insTagOpen = ref(false)//分类标签抽屉
const categoryOpen = ref(false)//服务类别抽屉
const typeOpen = ref(false)//服务类型抽屉
-const bodyTagOpen = ref(false)//体型标签抽屉
-const emotionTagOpen = ref(false)//情绪标签抽屉
-const mainOrgCode = ref()//指令库编码
const ownOrgCode = ref('') //本机构编码
const ownOrgName = ref('') //本机构名称
const filterIzEnabled = ref('enabled')//筛选全部/已启用
const directiveMainOrgInfo = ref()
function onOpenChange(record: string[]) {
- console.log("🚀 ~ onOpenChange ~ record:", record)
selectedKeys.value = record
- // const latestOpenKey = record.find(key => state.openKeys.indexOf(key) === -1);
- // if (state.rootSubmenuKeys.indexOf(latestOpenKey!) === -1) {
- // state.openKeys = openKeys;
- // } else {
- // state.openKeys = latestOpenKey ? [latestOpenKey] : [];
- // }
-}
-/**
- * 高级查询事件
- */
-function handleSuperQuery(params) {
- Object.keys(params).map((k) => {
- queryParam[k] = params[k];
- });
- searchQuery();
-}
-
-/**
- * 新增事件
- */
-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 handleMedia(record: Recordable) {
- registerModal.value.disableSubmit = false;
- registerModal.value.opeType = 'editMedia';
- registerModal.value.editMedia(record);
}
/**
@@ -697,14 +549,6 @@ function getTableAction(record) {
label: '详情',
onClick: handleDetail.bind(null, record),
},
- // {
- // label: '编辑',
- // onClick: handleEdit.bind(null, record)
- // },
- // {
- // label: '指令资源',
- // onClick: handleMedia.bind(null, record)
- // },
];
}
@@ -740,34 +584,6 @@ function expandTreeNodeToLevel4(directiveData: any) {
selectedKeys.value = [directiveData.instructionTagId, directiveData.categoryId, directiveData.typeId, directiveData.id]
openKeys.value = [directiveData.instructionTagId, directiveData.categoryId, directiveData.typeId, directiveData.id]
- // // 清空之前展开的节点
- // expandedKeys.value = [];
- // // 递归查找并展开相应的节点
- // const findAndExpandNode = (nodes: any[], level: number, directiveData: any) => {
- // for (const node of nodes) {
- // // 判断当前节点的 level 是否与 directiveData 的级别匹配
- // if (level === 1 && node.instructionId === directiveData.instructionTagId) {
- // expandedKeys.value.push(node.key);
- // if (node.children && node.children.length > 0) {
- // findAndExpandNode(node.children, 2, directiveData);
- // }
- // } else if (level === 2 && node.categoryId === directiveData.categoryId) {
- // expandedKeys.value.push(node.key);
- // if (node.children && node.children.length > 0) {
- // findAndExpandNode(node.children, 3, directiveData);
- // }
- // } else if (level === 3 && node.typeId === directiveData.typeId) {
- // expandedKeys.value.push(node.key);
- // if (node.children && node.children.length > 0) {
- // findAndExpandNode(node.children, 4, directiveData);
- // }
- // } else if (level === 4 && node.key === directiveData.id) {
- // expandedKeys.value.push(node.key);
- // }
- // }
- // };
- // // 调用递归方法,从树的根节点开始查找
- // findAndExpandNode(treeData.value, 1, directiveData);
}
/**
@@ -813,8 +629,6 @@ function searchReset() {
queryParam.bodyTags = '';
queryParam.emotionTags = '';
queryParam.id = '';
- // queryParam.izEnabled = '';
-
// 刷新数据
reload().then(() => {
initTree();
@@ -846,27 +660,6 @@ async function setRangeQuery() {
return queryParamClone;
}
-//分类标签抽屉打开
-function handleinstructionTag() {
- insTagOpen.value = true
-}
-//服务类别抽屉打开
-function handleCategory() {
- categoryOpen.value = true
-}
-//服务类型抽屉打开
-function handleType() {
- typeOpen.value = true
-}
-//体型标签抽屉打开
-function handleBodyTag() {
- bodyTagOpen.value = true
-}
-//情绪标签抽屉打开
-function handleEmotionTag() {
- emotionTagOpen.value = true
-}
-
//分类标签抽屉关闭
function onInsTagClose() {
insTagOpen.value = false
@@ -879,14 +672,6 @@ function onCategoryClose() {
function onTypeClose() {
typeOpen.value = false
}
-//体型标签抽屉关闭
-function onBodyTagClose() {
- bodyTagOpen.value = false
-}
-//体型标签抽屉关闭
-function onEmotionTagClose() {
- emotionTagOpen.value = false
-}
const showAudioModal = ref(false); // 控制音频模态框显示
const audioUrl = ref(''); // 音频 URL
@@ -929,79 +714,14 @@ const closeVideoModal = () => {
};
// 添加以下响应式变量
-const currentPlayingAudio = ref(null);
const isPlaying = ref(false);
-// 添加音频控制方法
-const playAudio = (url: string) => {
- if (currentPlayingAudio.value && currentPlayingAudio.value !== url) {
- // 如果正在播放其他音频,先停止
- stopAudio();
- }
-
- currentPlayingAudio.value = url;
- isPlaying.value = true;
-
- // 确保audio元素存在
- if (audioPlayer.value) {
- audioPlayer.value.src = getFileAccessHttpUrl(url);
- audioPlayer.value.play().catch(e => {
- isPlaying.value = false;
- currentPlayingAudio.value = null;
- });
- }
-};
-
-const pauseAudio = () => {
- if (audioPlayer.value) {
- audioPlayer.value.pause();
- isPlaying.value = false;
- }
-};
-
-const resumeAudio = () => {
- if (audioPlayer.value) {
- audioPlayer.value.play().catch(e => {
- });
- isPlaying.value = true;
- }
-};
-
-const restartAudio = () => {
- if (audioPlayer.value) {
- audioPlayer.value.currentTime = 0;
- audioPlayer.value.play().catch(e => {
- });
- isPlaying.value = true;
- }
-};
-
-const stopAudio = () => {
- if (audioPlayer.value) {
- audioPlayer.value.pause();
- audioPlayer.value.currentTime = 0;
- isPlaying.value = false;
- currentPlayingAudio.value = null;
- }
-};
-
-
-const clickCount = ref(0);
-const treeChildData = ref([]);
const expandedKeys = ref([]);
-
// 为每个 node 维护一个菜单状态和 hover 定时器
const menuState = reactive>({
})
-function onNodeEnter(node, level, event) {
- node.showIcon = true
-}
-
-function onNodeLeave(node) {
- node.showIcon = false
-}
function onNodeIconEnter(node, level) {
// 检查当前节点是否已经展开,如果是,则跳过关闭所有菜单的操作
@@ -1034,14 +754,6 @@ function onNodeIconLeave(node) {
delete s.timer
}
}
-// 用户点击图标手动打开
-function openMenu(node, level, ev) {
- closeAllMenus();
- const key = node.key
- if (!menuState[key]) menuState[key] = { openedByClick: false, open: false }
- menuState[key].openedByClick = true
- menuState[key].open = true
-}
// 当 Dropdown 自身触发 openChange(比如点击外部关闭)时,同步状态
function onMenuOpenChange(key: string, open: boolean) {
@@ -1216,23 +928,13 @@ function usingDirective(data) {
function stopDirective(data) {
registerModal.value.usingOrStop(data.key, 'N', true);
}
-//查看体型标签
-function bodyTagsDetail(data) {
-}
-//查看情绪标签
-function emotionTagsDetail(data) {
-
-}
// 根据层级返回菜单项
function menuItems(data) {
if (data.level === 1) {
const items = [
-
+ { key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', canAdd: true, action: addInstruction }
]
- if (!!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value) {
- items.push({ key: 'addIns', label: '新增分类标签', icon: 'ant-design:plus-outlined', canAdd: true && !!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value, action: addInstruction },)
- }
if (data.canAdd) {
items.push({ key: 'addCat', label: '新增服务类别', icon: 'ant-design:plus-outlined', canAdd: data.canAdd, action: addCategory })
}
@@ -1256,10 +958,7 @@ function menuItems(data) {
} else if (data.izEnabled === 'Y') {
items.push({ key: 'stopCat', label: '停用服务类别', icon: 'ant-design:stop-outlined', canAdd: data.parentLevelEnabled, action: stopCategory })
}
-
- if (!!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value) {
- items.push({ key: 'editCatImg', label: '修改类别图片', icon: 'ant-design:plus-outlined', canAdd: true && !!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value, action: editCategoryAnimationPath },)
- }
+ items.push({ key: 'editCatImg', label: '修改类别图片', icon: 'ant-design:plus-outlined', canAdd: true, action: editCategoryAnimationPath },)
return items
}
else if (data.level === 3) {
@@ -1274,42 +973,13 @@ function menuItems(data) {
} else if (data.izEnabled === 'Y') {
items.push({ key: 'stopTyp', label: '停用服务类型', icon: 'ant-design:stop-outlined', canAdd: data.parentLevelEnabled, action: stopType })
}
- if (!!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value) {
- items.push({ key: 'editTypeImg', label: '修改类型图片', icon: 'ant-design:plus-outlined', canAdd: true && !!mainOrgCode.value && mainOrgCode.value == ownOrgCode.value, action: editTypeAnimationPath },)
- }
+ items.push({ key: 'editTypeImg', label: '修改类型图片', icon: 'ant-design:plus-outlined', canAdd: true, action: editTypeAnimationPath },)
return items
}
- // else if (data.level === 4) {
- // const items = [
- // { key: 'editDir', label: '编辑服务指令', icon: 'ant-design:edit-outlined', canAdd: data.canAdd && data.izEnabled == 'Y', action: editDirective },
- // { key: 'editMedia', label: '编辑指令资源', icon: 'ant-design:edit-outlined', canAdd: data.canAdd && data.izEnabled == 'Y' && mainOrgCode.value == ownOrgCode.value, action: editMedia },
- // ]
- // // if (data.canAdd) {
- // // items.push({ key: 'addDir', label: '新增服务指令', icon: 'ant-design:plus-outlined', canAdd: data.canAdd , action: addDirective })
- // // }
- // if (data.izEnabled === 'N') {
- // items.push({ key: 'usingDir', label: '启用服务指令', icon: 'ant-design:check-circle-outlined', canAdd: data.canAdd, action: usingDirective })
- // } else if (data.izEnabled === 'Y') {
- // 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', canAdd: true, action: bodyTagsDetail })
- // }
- // if (data?.emotionTagList?.length > 0) {
- // items.push({ key: 'emotionTagsDetail', label: '查看情绪标签', icon: 'ant-design:stop-outlined', canAdd: true, action: emotionTagsDetail })
- // }
- // return items
- // }
return []
}
-// 递归取每级第一个 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)
-}
const treeLoading = ref(false)
function reloadTree() {
@@ -1376,23 +1046,13 @@ async function initTree() {
* 查看指令库
*/
function handleDirectiveMainOpen() {
- registerModal.value?.openDM(mainOrgCode.value)
+ registerModal.value?.openDM()
}
async function getDirectiveMainOrgCode() {
let { orgCode, orgName } = await getOrgInfo()
ownOrgCode.value = orgCode
ownOrgName.value = orgName
- let { configValue } = await queryByKey({ key: 'directive_main_org_code' })
- mainOrgCode.value = configValue
- if (orgCode != configValue) isShowDM.value = true
-}
-
-function handleBatchAdd() {
- batchAddOpen.value = true
- nextTick(() => {
- dmRef.value?.init()
- })
}
function onBatchAddClose() {
@@ -1407,13 +1067,6 @@ function onBatchAddSubmit() {
})
}
-
-function onAbnormalListOpen() {
- abnormalListOpen.value = true
- nextTick(() => {
- abnormalListRef.value?.reload()
- })
-}
function onAbnormalListClose() {
abnormalListOpen.value = false
searchQuery(true, true)
@@ -1430,10 +1083,6 @@ async function refreshDMExistedIds(dmOrgInfo, izReset = false, izQuery = true) {
}
}
-async function handleLookNewDirectives() {
- await refreshDMExistedIds(directiveMainOrgInfo.value, true)
- newDirectiveVisible.value = true
-}
/**
* 关闭新增指令
*/
@@ -1441,17 +1090,57 @@ function handleCancelNewDirective() {
newDirectiveVisible.value = false
}
-/**
- * 差异比对
- */
-function handleCompare() {
- compareListOpen.value = true
+const syncCode = ref('')
+//打开镜像码管理
+async function directiveSyncCodeMangeFunc() {
+ syncCode.value = ''
+ syncCodeVisible.value = true
+ if (!syncCode.value) {
+ let res = await getSyncCode({ 'orgCode': ownOrgCode.value })
+ syncCode.value = res.result
+ }
}
-function onCompareListClose() {
- compareListOpen.value = false
+async function updateSyncCodeFunc() {
+ createConfirm({
+ iconType: 'warning',
+ title: '更新镜像码',
+ content: '更新后旧的镜像码无法继续使用,是否确认更新?',
+ onOk:async () => {
+ syncCode.value = ''
+ let res = await updateSyncCode({ 'orgCode': ownOrgCode.value })
+ syncCode.value = res.result
+ },
+ onCancel() { },
+ });
}
+function copySyncCodeFunc() {
+ // 创建临时文本域
+ const textArea = document.createElement('textarea');
+ textArea.value = syncCode.value;
+ document.body.appendChild(textArea);
+ textArea.select();
+
+ try {
+ // 执行复制命令
+ const successful = document.execCommand('copy');
+ if (successful) {
+ createMessage.success('复制成功');
+ } else {
+ createMessage.error('复制失败');
+ }
+ } catch (err) {
+ console.error('复制失败:', err);
+ createMessage.error('复制失败');
+ } finally {
+ // 清理DOM
+ document.body.removeChild(textArea);
+ }
+}
+
+
+
// 添加音频结束监听
onMounted(() => {
if (audioPlayer.value) {
diff --git a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
index 33399fd..9b759d3 100644
--- a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
+++ b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue
@@ -116,44 +116,38 @@
+ :value="!!formData.previewFile ? formData.previewFile : defaultPrePic" maxCount="1" />
+ :bizPath="formComputedData.mediaFileSavePath" />
+ :value="!!formData.previewFileSmall ? formData.previewFileSmall : defaultPreSmallPic" maxCount="1" />
+ :bizPath="formComputedData.mediaFileSavePath" />
-
+
+ :bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
-
+
+ :bizPath="formComputedData.mediaFileSavePath" maxCount="1" fileType="mp4" />
+ :value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" maxCount="1" />
+ :bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
+ maxCount="1" />
+ :bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
diff --git a/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue b/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
index 2c53829..18d4306 100644
--- a/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
+++ b/src/views/services/serviceDirective/components/ConfigServiceDirectiveModal.vue
@@ -1,51 +1,23 @@
-
+ :bodyStyle="{ background: 'linear-gradient(135deg, #f1f7ff 0%, #f1f7ff 100%)', padding: '14px' }">
+ :formBpm="false" :mediaApiAddress="mediaApiAddress" :opeType="opeType">
关闭
确定
-
-
-
+
关闭
@@ -63,7 +35,6 @@ import { saveOrUpdate, useOrStopCascade, queryById, syncDirective } from '../Con
import DirectiveRespositoryList from './DirectiveRespositoryList.vue'
import { clearCache } from '/@/utils/cache/cacheUtil'
-const mainOrgCode = ref('')
const dmRef = ref()
const loading = ref(false)
const { createMessage, createConfirm } = useMessage();
@@ -103,7 +74,6 @@ function add() {
function edit(record, editMedia = false, showMedia = true) {
title.value = disableSubmit.value ? '详情' : opeType.value == 'add' ? '新增' : '编辑';
visible.value = true;
- mainOrgCode.value = record.orgCode_
nextTick(() => {
registerForm.value.edit(record, editMedia, showMedia, disableSubmit.value);
});
@@ -145,27 +115,6 @@ function handleOk() {
registerForm.value.submitForm();
}
-/**
- * 暂存
- */
-function handleSave() {
- registerForm.value.submitForm();
-}
-
-/**
- * 给审核对应的业务平台同步资源
- */
-function handleMediaAsync() {
- registerForm.value.syncMediaForBizFunc();
-}
-
-/**
- * 给所有业务平台同步资源
- */
-function handleMediaSyncAllPlat() {
- registerForm.value.syncMediaForAllBizFunc();
-}
-
/**
* form保存回调事件
*/
@@ -207,13 +156,8 @@ function queryByIdFunc(id) {
})
}
-function openDM(orgCode) {
+function openDM() {
dmVisible.value = true
- mainOrgCode.value = orgCode
- nextTick(() => {
- dmRef.value?.init()
- })
-
}
function handlePullDM() {
@@ -224,6 +168,11 @@ function handlePullDM() {
return
}
+ if (!dmRef.value.targetOrgCode) {
+ createMessage.warning('机构不存在')
+ return
+ }
+
createConfirm({
iconType: 'warning',
title: '镜像确认',
@@ -231,8 +180,8 @@ function handlePullDM() {
okText: '确认',
cancelText: '取消',
onOk: () => {
- syncDirective(mainOrgCode.value, { syncIds: selectedData.ids, })
- createMessage.success('从标准指令库开始拉取')
+ syncDirective(dmRef.value.targetOrgCode, { syncIds: selectedData.ids, })
+ createMessage.success('指令拉取中,请1分钟后重新查看')
// dmRef.value?.init()
handleCancelDM()
}
diff --git a/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue b/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
index 576ca51..e21d58b 100644
--- a/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
+++ b/src/views/services/serviceDirective/components/DirectiveRespositoryList.vue
@@ -1,96 +1,99 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+