服务指令包-获取服务指令列表启用状态01改为YN

This commit is contained in:
曹磊 2025-11-14 17:02:37 +08:00
parent 5d0851eaa7
commit 43d7f36fe9
3 changed files with 26 additions and 25 deletions

View File

@ -26,7 +26,7 @@
</div>
<a-row style="margin-top: -5px;">
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 5px 14px 0 0;height: 200px;">
<a-card
<a-card
:class="['card-3d']"
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
@mouseenter="directive.id"
@ -47,7 +47,7 @@
<a-button type="dashed" size="small" @click="packageEdit(directive)">编辑</a-button>
</div>
<div style="float:right;margin-top: 20px;">
<a-switch style="margin-left:10px" :checked="directive.izEnabled == '0'" @change="handleChangeIzEnabled(directive)" checked-children="" un-checked-children="" />
<a-switch style="margin-left:10px" :checked="directive.izEnabled == 'Y'" @change="handleChangeIzEnabled(directive)" checked-children="" un-checked-children="" />
</div>
</div>
</a-card>
@ -131,9 +131,9 @@ const pageParams = ref({ pageNo: 1, pageSize: 12 })
//
function handleChangeIzEnabled(record){
var izEnabled = record.izEnabled == '0' ? '1' : '0';
var izEnabled = record.izEnabled == 'Y' ? 'N' : 'Y';
var params = {id:record.id,izEnabled};
defHttp.post({ url: '/services/directivePackage/directivePackage/edit', params }).then((res) => {
defHttp.post({ url: '/services/directivePackage/directivePackage/edit', params }).then((res) => {
searchQuery()
});
}
@ -260,16 +260,16 @@ onMounted(() => {
overflow: hidden;
text-overflow: ellipsis;
}
.cardDivClass{
.cardDivClass{
transition: all 0.3s ease;
position: relative;
padding: 5px;background-color: white;border-radius: 8px;height: 180px;
box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
}
.cardDivClass:hover{
.cardDivClass:hover{
padding: 5px;background-color: #f4fcff;border-radius: 8px;height: 180px;
box-shadow:
box-shadow:
0 0 0 1px #59bffe, /* 描边 */
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
transform: translate(-2px , -2px); /* 轻微上浮效果 */

View File

@ -9,7 +9,7 @@
<a-form-item name="instructionTagId">
<template #label><span title="分类标签">分类标签</span></template>
<j-dict-select-tag v-model:value="queryParam.instructionTagId"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 'Y' order by sort asc`"
placeholder="请选择分类标签" allowClear :ignoreDisabled="true" @change="onInstructionTagChange" />
</a-form-item>
</a-col>
@ -18,7 +18,7 @@
<a-form-item name="categoryId">
<template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 'Y' and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
placeholder="请选择服务类别" allowClear :ignoreDisabled="true" @change="onCategoryChange" />
</a-form-item>
</a-col>
@ -27,7 +27,7 @@
<a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 'Y' and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
placeholder="请选择服务类型" allowClear :ignoreDisabled="true" />
</a-form-item>
</a-col>
@ -233,7 +233,8 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
beforeFetch: async (params) => {
params.column = 'createTime';
params.order = 'desc';
params.cycleType = '1,2'
params.cycleType = '1,2';
params.izEnabled = 'Y';
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
},
@ -459,4 +460,4 @@ a-checkbox-group {
a-checkbox {
margin-bottom: 8px;
}
</style>
</style>

View File

@ -25,7 +25,7 @@
<a-row >
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 5px 14px 0 0;height: 200px;">
<div @click="handlePackageClick(directive)" :class="{ 'selected': selectedDirective.id === directive.id }">
<a-card
<a-card
:class="['card-3d']"
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
@mouseenter="directive.id"
@ -51,8 +51,8 @@
<p style="margin-top: -10px;" class="text-ellipsis" :title="directive.description">说明{{directive.description}}</p>
</a-popover>
<div style="float:left;margin-top: 20px;">
<a-popover :title="directive.packageName">
<template #content>
<div style="min-width: 240px;">
@ -60,17 +60,17 @@
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div>
</div>
</template>
<a-button type="dashed" size="small">指令详情</a-button>
</a-popover>
</div>
<div style="float:right;margin-top: 20px;">
<a-switch style="margin-left:10px" :checked="directive.izEnabled == '0'" disabled checked-children="" un-checked-children="" />
<a-switch style="margin-left:10px" :checked="directive.izEnabled == 'Y'" disabled checked-children="" un-checked-children="" />
</div>
</div>
</a-card>
</div>
</a-col>
</a-row>
@ -169,7 +169,7 @@ function remove(data) {
/**
* 处理体型标签翻译
* @param directive_
* @param directive_
*/
function handleBodyTags(prefix, directive_, suffix) {
if (!!directive_.bodyTagList && directive_.bodyTagList.length > 0) {
@ -182,7 +182,7 @@ function handleBodyTags(prefix, directive_, suffix) {
/**
* 处理情绪标签翻译
* @param directive_
* @param directive_
*/
function handleEmotionTags(prefix, directive_, suffix) {
if (!!directive_.emotionTagList && directive_.emotionTagList.length > 0) {
@ -196,7 +196,7 @@ function handleEmotionTags(prefix, directive_, suffix) {
const directiveId = ref('')
/**
* 点击服务指令卡片时触发右侧展示指令详细信息
* @param directive
* @param directive
*/
function directiveInfo(directive_) {
derectiveInfo.value = directive_
@ -205,7 +205,7 @@ function directiveInfo(directive_) {
/**
* 指令包点击事件
* @param directive_
* @param directive_
*/
function handlePackageClick(directive_) {
resetSeletedDirectiveInfo()
@ -331,16 +331,16 @@ defineExpose({
font-size: 16px;
font-weight: 600;
}
.cardDivClass{
.cardDivClass{
transition: all 0.3s ease;
position: relative;
padding: 5px;background-color: white;border-radius: 8px;height: 180px;
box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
}
.cardDivClass:hover{
.cardDivClass:hover{
padding: 5px;background-color: #f4fcff;border-radius: 8px;height: 180px;
box-shadow:
box-shadow:
0 0 0 2px #d3d3d3, /* 描边 */
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
transform: translate(-2px , -2px); /* 轻微上浮效果 */