服务指令镜像bug

This commit is contained in:
1378012178@qq.com 2025-08-05 15:59:16 +08:00
parent 02935d4236
commit bac5f31b4f
10 changed files with 150 additions and 58 deletions

View File

@ -1,7 +1,15 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<BodyTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BodyTagForm>
</j-modal>
</j-modal> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<BodyTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BodyTagForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,7 +1,15 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<EmotionTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></EmotionTagForm>
</j-modal>
</j-modal> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<EmotionTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></EmotionTagForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,10 +1,20 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<InstructionTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false">
</InstructionTagForm>
</j-modal>
</j-modal> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<InstructionTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false">
</InstructionTagForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -1,10 +1,20 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ConfigServiceCategoryForm ref="registerForm" @ok="submitCallback"
:formDisabled="disableSubmit" :formBpm="false">
</ConfigServiceCategoryForm>
</j-modal>
</j-modal> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigServiceCategoryForm ref="registerForm" @ok="submitCallback"
:formDisabled="disableSubmit" :formBpm="false">
</ConfigServiceCategoryForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>

View File

@ -100,12 +100,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'serviceDuration',
width: 135,
},
{
title: '指令状态',
align: 'center',
dataIndex: 'status_dictText',
width: 100,
},
// {
// title: '指令状态',
// align: 'center',
// dataIndex: 'status_dictText',
// width: 100,
// },
{
title: '是否启用',
align: 'center',

View File

@ -224,19 +224,21 @@
</a-drawer>
<!-- 体型标签 -->
<a-drawer title="体型标签" width="60vw" :open="bodyTagOpen" @close="onBodyTagClose" bodyStyle="background: url(../../resource/img/modalback.png);">
<a-drawer title="体型标签" width="60vw" :open="bodyTagOpen" @close="onBodyTagClose"
bodyStyle="background: url(../../resource/img/modalback.png);">
<template #footer>
<a-button type="primary" @click="onBodyTagClose" style="float: right;">关闭</a-button>
</template>
<BodyTagList v-if="bodyTagOpen" ></BodyTagList>
<BodyTagList v-if="bodyTagOpen"></BodyTagList>
</a-drawer>
<!-- 情绪标签 -->
<a-drawer title="情绪标签" width="60vw" :open="emotionTagOpen" @close="onEmotionTagClose" bodyStyle="background: url(../../resource/img/modalback.png);">
<a-drawer title="情绪标签" width="60vw" :open="emotionTagOpen" @close="onEmotionTagClose"
bodyStyle="background: url(../../resource/img/modalback.png);">
<template #footer>
<a-button type="primary" @click="onEmotionTagClose" style="float: right;">关闭</a-button>
</template>
<EmotionTagList v-if="emotionTagOpen" ></EmotionTagList>
<EmotionTagList v-if="emotionTagOpen"></EmotionTagList>
</a-drawer>
<!-- 音频播放 -->
@ -495,12 +497,15 @@ function expandTreeNodeToLevel4(directiveData: any) {
/**
* 查询
*/
function searchQuery(reloadTree = true) {
function searchQuery(reloadTree = true, resetId = true) {
if (!!queryParam.directiveName || !!queryParam.bodyTags || !!queryParam.emotionTags) {
queryParam.instructionTagId = '';
queryParam.categoryId = '';
queryParam.typeId = '';
}
if (resetId) {
queryParam.id = ''
}
if (filterIzEnabled.value == 'enabled') {
queryParam.izEnabled = '0'
} else {
@ -528,6 +533,7 @@ function searchReset() {
queryParam.directiveName = ''; //
queryParam.bodyTags = '';
queryParam.emotionTags = '';
queryParam.id = '';
// queryParam.izEnabled = '';
//
@ -936,7 +942,7 @@ function setDefaultExpanded(nodes: any[]) {
const treeLoading = ref(false)
function reloadTree() {
tree().then(res => {
tree({ filterIzEnabled: filterIzEnabled.value }).then(res => {
treeData.value = res;
})
}
@ -948,6 +954,7 @@ function handleTreeSelect(selectedKeys: string[], { node }: any) {
queryParam.directiveName = '';
queryParam.bodyTags = '';
queryParam.emotionTags = '';
queryParam.id = ''
// queryParam.izEnabled = '';
//
@ -973,11 +980,12 @@ function handleTreeSelect(selectedKeys: string[], { node }: any) {
queryParam.categoryId = node.categoryId;
queryParam.typeId = node.typeId;
queryParam.directiveName = node.title;
queryParam.id = node.key
break;
}
if (level == 5) return
//
searchQuery(false);
searchQuery(false, level != 4);
}
function initTree() {

View File

@ -44,13 +44,13 @@ export const columns: BasicColumn[] = [
dataIndex: 'bodyTagList',
width: 150,
ellipsis: false,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
format(text, record, index) {
if (!!text) {
return text.map((item) => item.tagName).join('、');
} else {
return '-';
}
},
},
{
title: '情绪标签',
@ -58,13 +58,13 @@ export const columns: BasicColumn[] = [
dataIndex: 'emotionTagList',
width: 150,
ellipsis: false,
// format(text, record, index) {
// if (!!text) {
// return text.map((item) => item.tagName).join('、');
// } else {
// return '-';
// }
// },
format(text, record, index) {
if (!!text) {
return text.map((item) => item.tagName).join('、');
} else {
return '-';
}
},
},
{
title: '收费价格',
@ -100,12 +100,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'serviceDuration',
width: 135,
},
{
title: '指令状态',
align: 'center',
dataIndex: 'status_dictText',
width: 100,
},
// {
// title: '指令状态',
// align: 'center',
// dataIndex: 'status_dictText',
// width: 100,
// },
{
title: '是否启用',
align: 'center',

View File

@ -5,7 +5,7 @@
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="!isEditMedia">
<a-col :span="12">
<!-- <a-col :span="12">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
<j-dict-select-tag v-model:value="formData.instructionTagId" :orgCode="mainOrgCode"
@ -28,12 +28,12 @@
:orgCode="mainOrgCode" :disabled="!!formData.id" placeholder="请选择服务类型" allowClear
@upDictCode="upTypeDictCode" />
</a-form-item>
</a-col>
</a-col> -->
<a-col :span="12">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="ConfigServiceDirectiveForm-directiveName" name="directiveName">
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear
:disabled="!!formData.id"></a-input>
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear :maxlength="20"
:showCount="true" :disabled="!!formData.id"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -83,15 +83,13 @@
<a-col :span="24">
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId">
<JCheckbox v-model:value="formData.bodyTags" :orgCode="mainOrgCode"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`"
<JCheckbox v-model:value="formData.bodyTags" :orgCode="mainOrgCode" :dictCode="bodyTagDictCode"
@upDictCode="upBodyTagsDictCode" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags">
<JCheckbox v-model:value="formData.emotionTags" :orgCode="mainOrgCode"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`"
<JCheckbox v-model:value="formData.emotionTags" :orgCode="mainOrgCode" :dictCode="emotionTagDictCode"
@upDictCode="upEmotionTagsDictCode" />
</a-form-item>
</a-col>
@ -114,7 +112,8 @@
<a-col :span="12">
<a-form-item label="服务指令描述" v-bind="validateInfos.serviceContent"
id="ConfigServiceDirectiveForm-serviceContent" name="serviceContent">
<a-textarea v-model:value="formData.serviceContent" :rows="2" placeholder="请输入服务指令描述" />
<a-textarea v-model:value="formData.serviceContent" :autosize="true" placeholder="请输入服务指令描述"
:maxlength="200" :showCount="true" />
</a-form-item>
</a-col>
</a-row>
@ -196,7 +195,8 @@ const props = defineProps({
formBpm: { type: Boolean, default: true },
mainOrgCode: '',
});
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`)
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
@ -412,6 +412,18 @@ const showMedia = ref(true)
* isEditMedia_是否为编辑指令资源 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, showMedia_ = true) {
// if (!!record.bodyTags) {
// // 'id1','id2','id3'
// const bodyTagIds = record.bodyTags.split(',').map(id => `'${id}'`).join(',');
// bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0` + " and id in (" + bodyTagIds + ")" + ` order by sort asc`;
// }
// console.log("🌊 ~ edit ~ bodyTagDictCode.value:", bodyTagDictCode.value)
// if (!!record.emotionTags) {
// // 'id1','id2','id3'
// const emotionTagIds = record.emotionTags.split(',').map(id => `'${id}'`).join(',');
// emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0` + " and id in (" + emotionTagIds + ")" + ` order by sort asc`;
// }
needWatch.value = false
showMedia.value = showMedia_
setTimeout(() => {

View File

@ -1,20 +1,36 @@
<template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
<!-- <j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"
:maskClosable="false">
<template #footer>
<a-button @click="handleCancel">关闭</a-button>
<a-button @click="handleOk" v-show="opeType == 'add' || opeType == 'edit' || opeType == 'editMedia'"
:loading="loading">确定</a-button>
<!-- <a-button @click="handleSave" v-show="opeType == 'editMedia' || opeType == 'auditMedia'">暂存</a-button>
<a-button @click="handleSave" v-show="opeType == 'editMedia' || opeType == 'auditMedia'">暂存</a-button>
<a-button type="primary" @click="handleMediaAsync" v-show="opeType == 'auditMedia'">同步</a-button>
<a-button type="primary" @click="handleMediaSyncAllPlat" v-show="opeType == 'editMedia'">同步</a-button> -->
<a-button type="primary" @click="handleMediaSyncAllPlat" v-show="opeType == 'editMedia'">同步</a-button>
</template>
<a-spin :spinning="loading">
<ConfigServiceDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false" :mainOrgCode="mainOrgCode"></ConfigServiceDirectiveForm>
</a-spin>
</j-modal> -->
<a-drawer :title="title" width="70vw" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<a-spin :spinning="loading">
<ConfigServiceDirectiveForm ref="registerForm" v-if="visible" @ok="submitCallback" :formDisabled="disableSubmit"
:formBpm="false" :mainOrgCode="mainOrgCode"></ConfigServiceDirectiveForm>
</a-spin>
</j-modal>
<template #footer>
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
<a-button @click="handleOk" v-show="opeType == 'add' || opeType == 'edit' || opeType == 'editMedia'"
:loading="loading" style="margin-right: 8px;">确定</a-button>
<!-- <a-button @click="handleSave" v-show="opeType == 'editMedia' || opeType == 'auditMedia'">暂存</a-button>
<a-button type="primary" @click="handleMediaAsync" v-show="opeType == 'auditMedia'">同步</a-button>
<a-button type="primary" @click="handleMediaSyncAllPlat" v-show="opeType == 'editMedia'">同步</a-button> -->
</template>
</a-drawer>
<j-modal :title="'指令库'" :fullscreen="true" width="100vw" :visible="dmVisible" @cancel="handleCancelDM"
:maskClosable="false">
<template #footer>
@ -23,6 +39,16 @@
</template>
<DirectiveRespositoryList ref="dmRef" :mainOrgCode="mainOrgCode"></DirectiveRespositoryList>
</j-modal>
<!-- <a-drawer :title="'指令库'" width="100vw" v-model:visible="dmVisible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancelDM" :maskClosable="false">
<a-spin :spinning="loading">
<DirectiveRespositoryList ref="dmRef" :mainOrgCode="mainOrgCode"></DirectiveRespositoryList>
</a-spin>
<template #footer>
<a-button @click="handleCancelDM" style="margin-right: 8px;">关闭</a-button>
<a-button @click="handlePullDM">镜像</a-button>
</template>
</a-drawer> -->
</template>
<script lang="ts" setup>
@ -70,7 +96,7 @@ function add() {
* @param record
*/
function edit(record, editMedia = false, showMedia = true) {
title.value = disableSubmit.value ? '详情' : '编辑';
title.value = disableSubmit.value ? '详情' : opeType.value == 'add' ? '新增' : '编辑';
visible.value = true;
mainOrgCode.value = record.orgCode_
nextTick(() => {

View File

@ -1,9 +1,18 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ConfigServiceTypeForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</ConfigServiceTypeForm>
</j-modal>
</j-modal> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
<ConfigServiceTypeForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</ConfigServiceTypeForm>
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
@ -37,6 +46,7 @@ function add() {
* @param record
*/
function edit(record) {
// title.value = disableSubmit.value ? '' : '';
title.value = '新增';
visible.value = true;
nextTick(() => {