1、服务指令-机构详情-服务属性回显

2、操作日志:
	1)新增类型:增加服务属性展示、去除超时时长、将默认指令图标、焦点指令图标挪到指令描述上方
	2)变更类型:增加服务属性回显
This commit is contained in:
1378012178@qq.com 2026-03-03 10:59:44 +08:00
parent 0013392d52
commit c4199118e7
6 changed files with 107 additions and 31 deletions

View File

@ -24,6 +24,7 @@ enum Api {
getETMOrgInfo = '/api/common/getETMOrgInfo', //标准标签库信息
queryUpBizPrefix = '/api/sysUtils/queryUpBizPrefix',
getMediaUrlByOrgCode = '/api/baseInfo/getMediaUrlByOrgCode',
getManyDictItems = '/sys/api/getManyDictItems',
}
/**
@ -230,4 +231,22 @@ export const queryUpBizPrefix = () => {
*/
export const getMediaUrlByOrgCode = (params) => {
return defHttp.get({ url: Api.getMediaUrlByOrgCode, params });
};
};
/**
*
* @param params
*/
export const getManyDictItems = (params) => {
// 处理数组参数
if (params && params.dictCodeList && Array.isArray(params.dictCodeList)) {
const query = params.dictCodeList.map((code) => `dictCodeList=${encodeURIComponent(code)}`).join('&');
return defHttp.get(
{
url: `${Api.getManyDictItems}?${query}`,
},
{ isTransformResponse: false }
);
}
return defHttp.get({ url: Api.getManyDictItems, params }, { isTransformResponse: false });
};

View File

@ -42,6 +42,19 @@
<a-input v-model:value="formData.directiveName" placeholder="服务指令名称" disabled></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="服务属性" v-bind="validateInfos.serviceAttribute"
id="ConfigServiceDirectiveForm-serviceAttribute" name="serviceAttribute">
<j-dict-select-tag v-model:value="formData.serviceAttribute" dictCode="service_attribute"
placeholder="请选择服务属性" allow-clear disabled />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费价格 (元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input v-model:value="formData.tollPrice" placeholder="收费价格" disabled></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
name="cycleType">
@ -51,19 +64,8 @@
<a-col :span="12">
<a-form-item label="服务时长" v-bind="validateInfos.serviceDuration"
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
<a-input v-model:value="formData.serviceDuration" placeholder="服务时长(分钟)" addon-after="分钟" disabled></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="收费价格 (元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input v-model:value="formData.tollPrice" placeholder="收费价格" disabled></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="超时时长" v-bind="validateInfos.timeoutDuration"
id="ConfigServiceDirectiveForm-timeoutDuration" name="timeoutDuration">
<a-input v-model:value="formData.timeoutDuration" placeholder="超时时长(分钟)" addon-after="分钟" disabled></a-input>
<a-input v-model:value="formData.serviceDuration" placeholder="服务时长(分钟)" addon-after="分钟"
disabled></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -72,11 +74,35 @@
<a-input v-model:value="formData.comPrice" placeholder="提成价格" disabled></a-input>
</a-form-item>
</a-col>
<a-col :span="24" >
<a-form-item label="服务指令描述" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
name="comPrice">
<!-- <a-col :span="12">
<a-form-item label="超时时长" v-bind="validateInfos.timeoutDuration"
id="ConfigServiceDirectiveForm-timeoutDuration" name="timeoutDuration">
<a-input v-model:value="formData.timeoutDuration" placeholder="超时时长(分钟)" addon-after="分钟"
disabled></a-input>
</a-form-item>
</a-col> -->
<a-col :span="12">
</a-col>
<a-col :span="12">
<a-form-item label="默认指令图标" v-bind="validateInfos.immediateFile" id="ElderTagForm-immediateFile"
name="immediateFile">
<JImageUpload :fileMax="1" :value="opeMediaAddress + formData.immediateFile">
</JImageUpload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="焦点指令图标" v-bind="validateInfos.immediateFileFocus" id="ElderTagForm-immediateFileFocus"
name="immediateFileFocus">
<JImageUpload :fileMax="1" :value="opeMediaAddress + formData.immediateFileFocus">
</JImageUpload>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务指令描述" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
:labelCol="labelCol2" :wrapperCol="wrapperCol2" name="comPrice">
<a-textarea style="color: #606266;" v-model:value="formData.serviceContent" placeholder="服务指令描述"
:maxlength="200" :rows="3" :autoSize="{ minRows: 3 }" :showCount="true" disabled />
:maxlength="200" :rows="3" :autoSize="{ minRows: 3 }" :showCount="true" disabled />
</a-form-item>
</a-col>
</a-row>
@ -110,14 +136,14 @@
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
<JUploadMP4 :value="formData.mp4File" fileType="mp4" disabled />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 3">
<!-- <a-col :span="24" v-show="directiveMediaBtnValue == 3">
<JImageUploadtz :value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic"
disabled />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
<JImageUploadtz
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic" disabled />
</a-col>
</a-col> -->
</a-row>
<!-- <a-row style="padding: 20px;">
<a-col :span="2">
@ -158,9 +184,13 @@ import DirectiveRadioCom from './DirectiveRadioCom.vue'
import { DownOutlined } from '@ant-design/icons-vue';
import { queryUpBizPrefix } from '/@/api/common/api'
import { list } from '../DirectiveOpeLogInfo.api'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
const showDescription = ref(false);
const props = defineProps({
opeMediaAddress: null
});
//
const toggleDescription = () => {
showDescription.value = !showDescription.value;
@ -180,6 +210,7 @@ const formData = reactive<Record<string, any>>({
createTime: '',
cycleTypeName: '',
directiveName: '',
serviceAttribute: '',
instructionTagName: '',
opeType: '',
opeType_dictText: '',

View File

@ -59,16 +59,19 @@ import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.v
import { list } from '../DirectiveOpeLogInfo.api';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const props = defineProps({
fwsxDict: null
});
const loading = ref(false);
const oldData = ref<Record<string, any>>({});
const newData = ref<Record<string, any>>({});
//
const fieldLabels: Record<string, string> = {
instructionTagName: '分类标签',
categoryName: '服务类别',
typeName: '服务类型',
directiveName: '服务指令',
serviceAttribute: '服务属性',
tollPrice: '收费价格(元)',
comPrice: '提成价格(元)',
serviceContent: '服务指令描述',
@ -88,6 +91,7 @@ const displayFields = [
'categoryName',
'typeName',
'directiveName',
'serviceAttribute',
'tollPrice',
'comPrice',
'serviceDuration',
@ -124,9 +128,6 @@ const columns = computed(() => [
ellipsis: false
}
]);
setTimeout(()=>{
console.log("🌊 ~ tableData:", tableData)
},3000)
//
const tableData = computed(() => {
return displayFields.map(field => {
@ -205,9 +206,11 @@ async function init(record_: any) {
if (oldRecord) {
oldData.value = { ...oldRecord };
oldData.value.serviceAttribute = props.fwsxDict.service_attribute.find(d => d.value == oldData.value.serviceAttribute).text
}
if (newRecord) {
newData.value = { ...newRecord };
newData.value.serviceAttribute = props.fwsxDict.service_attribute.find(d => d.value == newData.value.serviceAttribute).text
}
} else if (data && data.records && data.records.length === 1) {
const record = data.records[0];

View File

@ -1,12 +1,13 @@
<template>
<a-drawer :title="title" width="800" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ 'padding': '14px' }" @close="handleCancel">
<a-drawer :title="title" width="800" v-model:visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ 'padding': '14px' }" @close="handleCancel">
<!-- 新增-查看 -->
<DirectiveOpeLogInfoAdd v-if="dataType == 'add'" ref="registerForm" @ok="submitCallback"
<DirectiveOpeLogInfoAdd v-if="dataType == 'add'" ref="registerForm" @ok="submitCallback" :opeMediaAddress="opeMediaAddress"
:formDisabled="disableSubmit" :formBpm="false">
</DirectiveOpeLogInfoAdd>
<!-- 变更-比较 -->
<DirectiveOpeLogInfoCompare v-if="dataType == 'compare'" ref="compareRef"></DirectiveOpeLogInfoCompare>
<DirectiveOpeLogInfoCompare :fwsxDict="fwsxDict" v-if="dataType == 'compare'" ref="compareRef">
</DirectiveOpeLogInfoCompare>
<template #footer>
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
</template>
@ -14,10 +15,12 @@
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import { ref, nextTick, defineExpose, onMounted } from 'vue';
import DirectiveOpeLogInfoAdd from './DirectiveOpeLogInfoAdd.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import DirectiveOpeLogInfoCompare from './DirectiveOpeLogInfoCompare.vue'
import { getManyDictItems } from '/@/api/common/api'
import { getMediaUrlByOrgCode } from '@/api/common/api'
const title = ref<string>('');
const width = ref<number>(800);
@ -27,6 +30,7 @@ const registerForm = ref();
const compareRef = ref();
const emit = defineEmits(['register', 'success']);
const dataType = ref('') //add compare
const opeMediaAddress = ref<string>('');
/**
* 编辑
@ -69,6 +73,19 @@ function compareDetail(record) {
});
}
const fwsxDict = ref()
onMounted(async () => {
const dictCodes = ['service_attribute'];
getManyDictItems({
dictCodeList: dictCodes
}).then(res => {
fwsxDict.value = res
})
const res = await getMediaUrlByOrgCode({ orgCode: '' });
opeMediaAddress.value = res.mediaUrl;
})
defineExpose({
detail,
disableSubmit,

View File

@ -24,7 +24,8 @@ const props = defineProps({
const emit = defineEmits(['update:directiveMediaBtnValue', 'change'])
const tabs = ['服务指令图片', '指令音频文件', '指令视频文件', '默认指令图标', '焦点指令图标']
// const tabs = ['', '', '', '', '']
const tabs = ['服务指令图片', '指令音频文件', '指令视频文件']
const activeTab = ref(props.directiveMediaBtnValue)
watch(() => props.directiveMediaBtnValue, (newVal) => {

View File

@ -36,6 +36,11 @@ export const columns: BasicColumn[] = [
align: 'center',
dataIndex: 'directiveName',
},
{
title: '服务属性',
align: 'center',
dataIndex: 'serviceAttribute_dictText',
},
// {
// title: '体型标签',
// align: 'center',