服务指令bug

This commit is contained in:
1378012178@qq.com 2025-08-08 14:06:45 +08:00
parent e075fa8dcd
commit 2ae472c789
6 changed files with 84 additions and 45 deletions

View File

@ -392,7 +392,6 @@ function add() {
* isAudit_是否为服务指令那个审核 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, isAudit_ = false) {
console.log("🌊 ~ edit ~ record:", record)
isEditMedia.value = isEditMedia_
isAudit.value = isAudit_
formData.bodyTags = ''

View File

@ -104,13 +104,13 @@
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId">
<JCheckbox v-model:value="formData.bodyTags" :orgCode="formData?.sysOrgCode"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
:dictCode="bodyTagDictCode" />
</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="formData?.sysOrgCode"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
:dictCode="emotionTagDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -216,7 +216,8 @@ const props = defineProps({
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
});
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`)
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
@ -391,7 +392,24 @@ function add() {
* isAudit_是否为服务指令那个审核 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, isAudit_ = false) {
console.log("🌊 ~ edit ~ record:", record)
if (!!record.bodyTags ) {
// "id = 'id1' or id = 'id2'"
const bodyTagConditions = record.bodyTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(bodyTagConditions ? ` and (${bodyTagConditions})` : '') +
` order by sort asc`;
}
if (!!record.emotionTags ) {
// "id = 'id1' or id = 'id2'"
const emotionTagConditions = record.emotionTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(emotionTagConditions ? ` and (${emotionTagConditions})` : '') +
` order by sort asc`;
}
isEditMedia.value = isEditMedia_
isAudit.value = isAudit_
formData.bodyTags = ''

View File

@ -20,8 +20,8 @@
</a-col>
<a-col :span="props.layout == 'full' ? 8 : 11" style="text-align: right;">
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
<span v-if="selectedOrgs.some(org => org.orgCode === item.orgCode)"
style="color: green; font-size: 12px; white-space: nowrap;">已选择</span>
<!-- <span v-if="selectedOrgs.some(org => org.orgCode === item.orgCode)"
style="color: green; font-size: 12px; white-space: nowrap;">已选择</span> -->
<span v-if="dmOrg?.orgCode === item.orgCode"
style="color: green; font-size: 12px; font-weight: bold; white-space: nowrap;">标准指令库</span>
<div class="zxClass" style="min-width: 35px;">{{ item.orgCode }}</div>

View File

@ -80,12 +80,12 @@
<a-col :lg="12" :sm="24">
<!-- 引用表格 -->
<a-tag color="blue" style="margin-left: 10px;margin-top: 10px;">源平台 - {{ sourceOrgInfo.departName }}</a-tag>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
<a-radio-group v-model:value="sourceType" size="small" @change="sourceTypeChanged">
<a-radio-button value="all">全部</a-radio-button>
<a-radio-button value="unsel">可同步</a-radio-button>
</a-radio-group>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:10px;margin-right:10px;" />
<a-button type="primary" @click="selectAll" size="small">一键全选</a-button>
<BasicTable @register="registerTable" :dataSource="leftList" size="small" :rowClassName="rowClassName"
:columns="targetChooseType == 'one' ? sourceColumns : targetSourceColumns" :scroll="{ y: '57vh' }">
@ -121,13 +121,13 @@
<a-tag v-else color="green" style="margin-left: 10px;margin-top: 10px;">
已选择 {{ rightNeedAddList.length }}
</a-tag>
<a-divider v-if="targetChooseType == 'one'" type="vertical" style="background-color: #CDCDCF" />
<a-divider v-if="targetChooseType == 'one'" type="vertical" style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
<a-radio-group v-if="targetChooseType == 'one'" v-model:value="targetType" size="small"
@change="targetTypeChanged">
<a-radio-button value="exist">已有</a-radio-button>
<a-radio-button value="needsync">待同步</a-radio-button>
</a-radio-group>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-divider type="vertical" style="background-color: #CDCDCF;margin-left:10px;margin-right:10px;" />
<a-button type="primary" @click="removeAll" size="small">全部移除</a-button>
<!-- <a-divider type="vertical" style="background-color: #CDCDCF" />
<a-button type="warning" @click="syncFunc" size="small">同步</a-button> -->

View File

@ -56,7 +56,7 @@
<a-drawer title="日志" width="80vw" v-model:visible="logsVisible"
:bodyStyle="{ padding: '0', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
<a-row>
<a-row style="overflow-x: hidden !important;">
<a-col :span="2" :push="22" style="margin-top: 15px;margin-left: 30px;">
<a-button type="primary" @click="handleRefreshLogs" title="刷新">
刷新

View File

@ -7,20 +7,21 @@
<a-button type="link" @click="showSourceOrgListModal" size="small">请选择</a-button>
</div>
<div class="selected-orgs" v-if="!!orgInfo.length">
<a-card class="org-card" :headStyle="{ height: '60px', padding: '0 24px' }"
<a-card :headStyle="{ height: '60px', padding: '0 24px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="21" style="font-size: 14px; padding-top: 4px;">
<a-row style="font-weight: normal; margin-bottom: 12px;">
<a-col :span="18" style="font-size: 14px;">
<div>
<span style="font-weight: bold;">{{ orgInfo[0]?.departName }}</span>
</div>
</a-col>
<a-col :span="3" style="text-align: center; padding-top: 4px;">
<div class="zxClass">{{ orgInfo[0]?.orgCode }}</div>
<a-col :span="6" style="text-align: right;">
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
<div class="zxClass" style="min-width: 25px;">{{ orgInfo[0]?.orgCode }}</div>
</div>
</a-col>
</a-row>
</template>
<a-divider />
<p>加盟时间{{ orgInfo[0]?.franchiseTime?.substring(0, 10) }}</p>
<p>机构负责人{{ orgInfo[0]?.orgLeader }}</p>
<p>负责人电话{{ orgInfo[0]?.orgLeaderPhone }}</p>
@ -45,23 +46,22 @@
<div class="selected-orgs" ref="selectedOrgsContainer" style="height: 46vh; overflow: auto;"
v-if="!!syncOrgs.length">
<a-card v-for="orgItem of syncOrgs" class="org-card"
:class="{ 'selected-card': selectedTargetOrgs.some(org => org.orgCode === orgItem.orgCode) }"
:class="{ 'selected-card': selectedTargetOrgs.some(org => org.orgCode === orgItem.orgCode), 'org-card': true }"
:headStyle="{ height: '60px', padding: '0 24px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"
@click="handleTargetOrgChange(orgItem)">
<template #title>
<a-row style="font-weight: normal;">
<a-col :span="21" style="font-size: 14px; padding-top: 4px;">
<a-row style="font-weight: normal; margin-bottom: 12px;">
<a-col :span="18" style="font-size: 14px;">
<div>
<span style="font-weight: bold;">{{ orgItem?.departName }}</span>
<span v-show="selectedTargetOrgs.some(org => org.orgCode === orgItem.orgCode)"
style="color: green; font-size: 12px; margin-left: 8px;">已选择</span>
<span style="font-weight: bold;">{{ orgItem.departName }}</span>
</div>
</a-col>
<a-col :span="3" style="text-align: center; padding-top: 4px;">
<div class="zxClass">{{ orgItem?.orgCode }}</div>
<a-col :span="6" style="text-align: right;">
<div style="display: flex; align-items: center; justify-content: flex-end; gap: 8px;">
<div class="zxClass" style="min-width: 25px;">{{ orgItem.orgCode }}</div>
</div>
</a-col>
</a-row>
</template>
<a-divider />
<p>加盟时间{{ orgItem?.franchiseTime?.substring(0, 10) }}</p>
<p>机构负责人{{ orgItem?.orgLeader }}</p>
<p>负责人电话{{ orgItem?.orgLeaderPhone }}</p>
@ -76,7 +76,8 @@
<div class="zljx-platform">
<span class="section-title">指令镜像</span>
<div class="directive-choose-wrapper">
<DirectiveChooseCom v-show="!!orgInfo.length" ref="directiveChooseRef" :targetChooseType="targetChooseType" :targetOrgs="selectedTargetOrgs">
<DirectiveChooseCom v-show="!!orgInfo.length" ref="directiveChooseRef" :targetChooseType="targetChooseType"
:targetOrgs="selectedTargetOrgs">
</DirectiveChooseCom>
</div>
</div>
@ -242,7 +243,7 @@ function targetChooseTypeChanged(val_) {
}
});
}
emit('changeSyncText',val_.target.value)
emit('changeSyncText', val_.target.value)
}
//
@ -257,7 +258,7 @@ function handleGetTarget() {
handleCancelTarget()
}
function syncFunc(){
function syncFunc() {
directiveChooseRef.value?.syncFunc()
}
@ -378,6 +379,10 @@ defineExpose({
height: 25px;
color: white;
line-height: 25px;
padding: 0 8px;
/* 增加内边距 */
flex-shrink: 0;
/* 防止被压缩 */
}
.tbClass {
@ -395,17 +400,34 @@ defineExpose({
.ellipsis-one-lines {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
.selected-card {
border: 2px solid #1890ff;
box-shadow: 0 0 2px rgba(24, 144, 255, 0.3);
box-shadow: 0 0 8px rgba(24, 144, 255, 0.3);
}
.directive-selected-card {
border: 2px solid #1890FF;
box-shadow: 0 0 8px rgba(37, 149, 255, 0.3);
}
.org-card {
margin-top: 8px;
&:hover {
border-color: #55a9f8;
/* 这是悬停时的蓝色边框 */
box-shadow: 0 2px 8px rgba(37, 149, 255, 0.3);
/* 这是悬停时的淡蓝色阴影 */
}
}
:deep .ant-divider {
margin: 0 0 8px 0;
}
</style>