1、服务指令-机构详情-服务属性回显
2、操作日志: 1)新增类型:增加服务属性展示、去除超时时长、将默认指令图标、焦点指令图标挪到指令描述上方 2)变更类型:增加服务属性回显
This commit is contained in:
parent
0013392d52
commit
c4199118e7
|
|
@ -24,6 +24,7 @@ enum Api {
|
||||||
getETMOrgInfo = '/api/common/getETMOrgInfo', //标准标签库信息
|
getETMOrgInfo = '/api/common/getETMOrgInfo', //标准标签库信息
|
||||||
queryUpBizPrefix = '/api/sysUtils/queryUpBizPrefix',
|
queryUpBizPrefix = '/api/sysUtils/queryUpBizPrefix',
|
||||||
getMediaUrlByOrgCode = '/api/baseInfo/getMediaUrlByOrgCode',
|
getMediaUrlByOrgCode = '/api/baseInfo/getMediaUrlByOrgCode',
|
||||||
|
getManyDictItems = '/sys/api/getManyDictItems',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -230,4 +231,22 @@ export const queryUpBizPrefix = () => {
|
||||||
*/
|
*/
|
||||||
export const getMediaUrlByOrgCode = (params) => {
|
export const getMediaUrlByOrgCode = (params) => {
|
||||||
return defHttp.get({ url: Api.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 });
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,19 @@
|
||||||
<a-input v-model:value="formData.directiveName" placeholder="服务指令名称" disabled></a-input>
|
<a-input v-model:value="formData.directiveName" placeholder="服务指令名称" disabled></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</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-col :span="12">
|
||||||
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
|
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
|
||||||
name="cycleType">
|
name="cycleType">
|
||||||
|
|
@ -51,19 +64,8 @@
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="服务时长" v-bind="validateInfos.serviceDuration"
|
<a-form-item label="服务时长" v-bind="validateInfos.serviceDuration"
|
||||||
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
|
id="ConfigServiceDirectiveForm-serviceDuration" name="serviceDuration">
|
||||||
<a-input v-model:value="formData.serviceDuration" placeholder="服务时长(分钟)" addon-after="分钟" disabled></a-input>
|
<a-input v-model:value="formData.serviceDuration" placeholder="服务时长(分钟)" addon-after="分钟"
|
||||||
</a-form-item>
|
disabled></a-input>
|
||||||
</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-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|
@ -72,11 +74,35 @@
|
||||||
<a-input v-model:value="formData.comPrice" placeholder="提成价格" disabled></a-input>
|
<a-input v-model:value="formData.comPrice" placeholder="提成价格" disabled></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" >
|
<!-- <a-col :span="12">
|
||||||
<a-form-item label="服务指令描述" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
|
<a-form-item label="超时时长" v-bind="validateInfos.timeoutDuration"
|
||||||
name="comPrice">
|
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="服务指令描述"
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
@ -110,14 +136,14 @@
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
|
||||||
<JUploadMP4 :value="formData.mp4File" fileType="mp4" disabled />
|
<JUploadMP4 :value="formData.mp4File" fileType="mp4" disabled />
|
||||||
</a-col>
|
</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"
|
<JImageUploadtz :value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic"
|
||||||
disabled />
|
disabled />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
|
||||||
<JImageUploadtz
|
<JImageUploadtz
|
||||||
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic" disabled />
|
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic" disabled />
|
||||||
</a-col>
|
</a-col> -->
|
||||||
</a-row>
|
</a-row>
|
||||||
<!-- <a-row style="padding: 20px;">
|
<!-- <a-row style="padding: 20px;">
|
||||||
<a-col :span="2">
|
<a-col :span="2">
|
||||||
|
|
@ -158,9 +184,13 @@ import DirectiveRadioCom from './DirectiveRadioCom.vue'
|
||||||
import { DownOutlined } from '@ant-design/icons-vue';
|
import { DownOutlined } from '@ant-design/icons-vue';
|
||||||
import { queryUpBizPrefix } from '/@/api/common/api'
|
import { queryUpBizPrefix } from '/@/api/common/api'
|
||||||
import { list } from '../DirectiveOpeLogInfo.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 showDescription = ref(false);
|
||||||
|
const props = defineProps({
|
||||||
|
opeMediaAddress: null
|
||||||
|
});
|
||||||
// 切换悬浮容器的显示状态
|
// 切换悬浮容器的显示状态
|
||||||
const toggleDescription = () => {
|
const toggleDescription = () => {
|
||||||
showDescription.value = !showDescription.value;
|
showDescription.value = !showDescription.value;
|
||||||
|
|
@ -180,6 +210,7 @@ const formData = reactive<Record<string, any>>({
|
||||||
createTime: '',
|
createTime: '',
|
||||||
cycleTypeName: '',
|
cycleTypeName: '',
|
||||||
directiveName: '',
|
directiveName: '',
|
||||||
|
serviceAttribute: '',
|
||||||
instructionTagName: '',
|
instructionTagName: '',
|
||||||
opeType: '',
|
opeType: '',
|
||||||
opeType_dictText: '',
|
opeType_dictText: '',
|
||||||
|
|
|
||||||
|
|
@ -59,16 +59,19 @@ import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.v
|
||||||
import { list } from '../DirectiveOpeLogInfo.api';
|
import { list } from '../DirectiveOpeLogInfo.api';
|
||||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
fwsxDict: null
|
||||||
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const oldData = ref<Record<string, any>>({});
|
const oldData = ref<Record<string, any>>({});
|
||||||
const newData = ref<Record<string, any>>({});
|
const newData = ref<Record<string, any>>({});
|
||||||
|
|
||||||
// 字段映射,用于显示中文名称
|
// 字段映射,用于显示中文名称
|
||||||
const fieldLabels: Record<string, string> = {
|
const fieldLabels: Record<string, string> = {
|
||||||
instructionTagName: '分类标签',
|
instructionTagName: '分类标签',
|
||||||
categoryName: '服务类别',
|
categoryName: '服务类别',
|
||||||
typeName: '服务类型',
|
typeName: '服务类型',
|
||||||
directiveName: '服务指令',
|
directiveName: '服务指令',
|
||||||
|
serviceAttribute: '服务属性',
|
||||||
tollPrice: '收费价格(元)',
|
tollPrice: '收费价格(元)',
|
||||||
comPrice: '提成价格(元)',
|
comPrice: '提成价格(元)',
|
||||||
serviceContent: '服务指令描述',
|
serviceContent: '服务指令描述',
|
||||||
|
|
@ -88,6 +91,7 @@ const displayFields = [
|
||||||
'categoryName',
|
'categoryName',
|
||||||
'typeName',
|
'typeName',
|
||||||
'directiveName',
|
'directiveName',
|
||||||
|
'serviceAttribute',
|
||||||
'tollPrice',
|
'tollPrice',
|
||||||
'comPrice',
|
'comPrice',
|
||||||
'serviceDuration',
|
'serviceDuration',
|
||||||
|
|
@ -124,9 +128,6 @@ const columns = computed(() => [
|
||||||
ellipsis: false
|
ellipsis: false
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
setTimeout(()=>{
|
|
||||||
console.log("🌊 ~ tableData:", tableData)
|
|
||||||
},3000)
|
|
||||||
// 表格数据
|
// 表格数据
|
||||||
const tableData = computed(() => {
|
const tableData = computed(() => {
|
||||||
return displayFields.map(field => {
|
return displayFields.map(field => {
|
||||||
|
|
@ -205,9 +206,11 @@ async function init(record_: any) {
|
||||||
|
|
||||||
if (oldRecord) {
|
if (oldRecord) {
|
||||||
oldData.value = { ...oldRecord };
|
oldData.value = { ...oldRecord };
|
||||||
|
oldData.value.serviceAttribute = props.fwsxDict.service_attribute.find(d => d.value == oldData.value.serviceAttribute).text
|
||||||
}
|
}
|
||||||
if (newRecord) {
|
if (newRecord) {
|
||||||
newData.value = { ...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) {
|
} else if (data && data.records && data.records.length === 1) {
|
||||||
const record = data.records[0];
|
const record = data.records[0];
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<a-drawer :title="title" width="800" v-model:visible="visible" :closable="true"
|
<a-drawer :title="title" width="800" v-model:visible="visible" :closable="true" :footer-style="{ textAlign: 'right' }"
|
||||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ 'padding': '14px' }" @close="handleCancel">
|
: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">
|
:formDisabled="disableSubmit" :formBpm="false">
|
||||||
</DirectiveOpeLogInfoAdd>
|
</DirectiveOpeLogInfoAdd>
|
||||||
<!-- 变更-比较 -->
|
<!-- 变更-比较 -->
|
||||||
<DirectiveOpeLogInfoCompare v-if="dataType == 'compare'" ref="compareRef"></DirectiveOpeLogInfoCompare>
|
<DirectiveOpeLogInfoCompare :fwsxDict="fwsxDict" v-if="dataType == 'compare'" ref="compareRef">
|
||||||
|
</DirectiveOpeLogInfoCompare>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
|
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -14,10 +15,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, nextTick, defineExpose } from 'vue';
|
import { ref, nextTick, defineExpose, onMounted } from 'vue';
|
||||||
import DirectiveOpeLogInfoAdd from './DirectiveOpeLogInfoAdd.vue'
|
import DirectiveOpeLogInfoAdd from './DirectiveOpeLogInfoAdd.vue'
|
||||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
import DirectiveOpeLogInfoCompare from './DirectiveOpeLogInfoCompare.vue'
|
import DirectiveOpeLogInfoCompare from './DirectiveOpeLogInfoCompare.vue'
|
||||||
|
import { getManyDictItems } from '/@/api/common/api'
|
||||||
|
import { getMediaUrlByOrgCode } from '@/api/common/api'
|
||||||
|
|
||||||
const title = ref<string>('');
|
const title = ref<string>('');
|
||||||
const width = ref<number>(800);
|
const width = ref<number>(800);
|
||||||
|
|
@ -27,6 +30,7 @@ const registerForm = ref();
|
||||||
const compareRef = ref();
|
const compareRef = ref();
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
const dataType = ref('') //add新增 compare比较
|
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({
|
defineExpose({
|
||||||
detail,
|
detail,
|
||||||
disableSubmit,
|
disableSubmit,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ const props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits(['update:directiveMediaBtnValue', 'change'])
|
const emit = defineEmits(['update:directiveMediaBtnValue', 'change'])
|
||||||
|
|
||||||
const tabs = ['服务指令图片', '指令音频文件', '指令视频文件', '默认指令图标', '焦点指令图标']
|
// const tabs = ['服务指令图片', '指令音频文件', '指令视频文件', '默认指令图标', '焦点指令图标']
|
||||||
|
const tabs = ['服务指令图片', '指令音频文件', '指令视频文件']
|
||||||
const activeTab = ref(props.directiveMediaBtnValue)
|
const activeTab = ref(props.directiveMediaBtnValue)
|
||||||
|
|
||||||
watch(() => props.directiveMediaBtnValue, (newVal) => {
|
watch(() => props.directiveMediaBtnValue, (newVal) => {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ export const columns: BasicColumn[] = [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'directiveName',
|
dataIndex: 'directiveName',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '服务属性',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'serviceAttribute_dictText',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// title: '体型标签',
|
// title: '体型标签',
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue