parent
9096722666
commit
f99e7c1814
|
@ -1,21 +1,18 @@
|
|||
<template>
|
||||
<a-radio-group v-if="compType === CompTypeEnum.Radio" v-bind="attrs" v-model:value="state" @change="handleChangeRadio">
|
||||
<a-radio-group v-if="compType === CompTypeEnum.Radio" v-bind="attrs" v-model:value="state"
|
||||
@change="handleChangeRadio">
|
||||
<template v-for="item in dictOptions" :key="`${item.value}`">
|
||||
<a-radio :value="item.value">
|
||||
<span :class="[useDicColor && item.color ? 'colorText' : '']" :style="{ backgroundColor: `${useDicColor && item.color}` }">
|
||||
<span :class="[useDicColor && item.color ? 'colorText' : '']"
|
||||
:style="{ backgroundColor: `${useDicColor && item.color}` }">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-radio>
|
||||
</template>
|
||||
</a-radio-group>
|
||||
|
||||
<a-radio-group
|
||||
v-else-if="compType === CompTypeEnum.RadioButton"
|
||||
v-bind="attrs"
|
||||
v-model:value="state"
|
||||
buttonStyle="solid"
|
||||
@change="handleChangeRadio"
|
||||
>
|
||||
<a-radio-group v-else-if="compType === CompTypeEnum.RadioButton" v-bind="attrs" v-model:value="state"
|
||||
buttonStyle="solid" @change="handleChangeRadio">
|
||||
<template v-for="item in dictOptions" :key="`${item.value}`">
|
||||
<a-radio-button :value="item.value">
|
||||
{{ item.label }}
|
||||
|
@ -30,24 +27,13 @@
|
|||
<LoadingOutlined />
|
||||
</template>
|
||||
</a-input>
|
||||
<a-select
|
||||
v-else
|
||||
:placeholder="placeholder"
|
||||
v-bind="attrs"
|
||||
v-model:value="state"
|
||||
:filterOption="handleFilterOption"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
:style="style"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select v-else :placeholder="placeholder" v-bind="attrs" v-model:value="state" :filterOption="handleFilterOption"
|
||||
:getPopupContainer="getPopupContainer" :style="style" @change="handleChange">
|
||||
<a-select-option v-if="showChooseOption" :value="null">请选择…</a-select-option>
|
||||
<template v-for="item in dictOptions" :key="`${item.value}`">
|
||||
<a-select-option :value="item.value">
|
||||
<span
|
||||
:class="[useDicColor && item.color ? 'colorText' : '']"
|
||||
:style="{ backgroundColor: `${useDicColor && item.color}` }"
|
||||
:title="item.label"
|
||||
>
|
||||
<a-select-option :value="item.value" :disabled="item.disabled">
|
||||
<span :class="[useDicColor && item.color ? 'colorText' : '']"
|
||||
:style="{ backgroundColor: `${useDicColor && item.color}` }" :title="item.label">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
|
@ -56,16 +42,16 @@
|
|||
</template>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType, ref, reactive, watchEffect, computed, unref, watch, onMounted, nextTick } from 'vue';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||
import { initDictOptions } from '/@/utils/dict';
|
||||
import { get, omit } from 'lodash-es';
|
||||
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||
import { CompTypeEnum } from '/@/enums/CompTypeEnum';
|
||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||
import { defineComponent, PropType, ref, reactive, watchEffect, computed, unref, watch, onMounted, nextTick } from 'vue';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||
import { initDictOptions } from '/@/utils/dict';
|
||||
import { get, omit } from 'lodash-es';
|
||||
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||
import { CompTypeEnum } from '/@/enums/CompTypeEnum';
|
||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
export default defineComponent({
|
||||
export default defineComponent({
|
||||
name: 'JDictSelectTag',
|
||||
inheritAttrs: false,
|
||||
components: { LoadingOutlined },
|
||||
|
@ -90,7 +76,7 @@
|
|||
},
|
||||
style: propTypes.any,
|
||||
},
|
||||
emits: ['options-change', 'change','update:value'],
|
||||
emits: ['options-change', 'change', 'update:value'],
|
||||
setup(props, { emit, refs }) {
|
||||
const dictOptions = ref<any[]>([]);
|
||||
const attrs = useAttrs();
|
||||
|
@ -142,10 +128,12 @@
|
|||
const dictData = await initDictOptions(dictCode);
|
||||
dictOptions.value = dictData.reduce((prev, next) => {
|
||||
if (next) {
|
||||
console.log(next['status'] == 1)
|
||||
const value = next['value'];
|
||||
prev.push({
|
||||
label: next['text'] || next['label'],
|
||||
value: stringToNumber ? +value : value,
|
||||
disabled:next['status'] != 0,
|
||||
color: next['color'],
|
||||
...omit(next, ['text', 'value', 'color']),
|
||||
});
|
||||
|
@ -156,7 +144,7 @@
|
|||
|
||||
function handleChange(e) {
|
||||
const { mode } = unref<Recordable>(getBindValue);
|
||||
let changeValue:any;
|
||||
let changeValue: any;
|
||||
// 兼容多选模式
|
||||
|
||||
//update-begin---author:wangshuai ---date:20230216 for:[QQYUN-4290]公文发文:选择机关代字报错,是因为值改变触发了change事件三次,导致数据发生改变------------
|
||||
|
@ -176,7 +164,7 @@
|
|||
state.value = changeValue;
|
||||
|
||||
//update-begin---author:wangshuai ---date:20230403 for:【issues/4507】JDictSelectTag组件使用时,浏览器给出警告提示:Expected Function, got Array------------
|
||||
emit('update:value',changeValue)
|
||||
emit('update:value', changeValue)
|
||||
//update-end---author:wangshuai ---date:20230403 for:【issues/4507】JDictSelectTag组件使用时,浏览器给出警告提示:Expected Function, got Array述------------
|
||||
//update-end---author:wangshuai ---date:20230216 for:[QQYUN-4290]公文发文:选择机关代字报错,是因为值改变触发了change事件三次,导致数据发生改变------------
|
||||
|
||||
|
@ -187,7 +175,7 @@
|
|||
function handleChangeRadio(e) {
|
||||
state.value = e?.target?.value ?? e;
|
||||
//update-begin---author:wangshuai ---date:20230504 for:【issues/506】JDictSelectTag 组件 type="radio" 没有返回值------------
|
||||
emit('update:value',e?.target?.value ?? e)
|
||||
emit('update:value', e?.target?.value ?? e)
|
||||
//update-end---author:wangshuai ---date:20230504 for:【issues/506】JDictSelectTag 组件 type="radio" 没有返回值------------
|
||||
}
|
||||
|
||||
|
@ -219,11 +207,11 @@
|
|||
handleFilterOption,
|
||||
};
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
.colorText {
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
.colorText {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
|
@ -232,6 +220,6 @@
|
|||
background-color: red;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
</style>
|
||||
}
|
||||
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置</style>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="tagName">
|
||||
<template #label><span title="标签名称">标签名称</span></template>
|
||||
<JInput v-model:value="queryParam.tagName" allowClear placeholder="请输入标签名称"/>
|
||||
<JInput v-model:value="queryParam.tagName" allowClear placeholder="请输入标签名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
@ -95,8 +95,13 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 50,
|
||||
pageSizeOptions: ['50', '70', '100'],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
|
@ -195,16 +200,7 @@ function getTableAction(record) {
|
|||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
}, {
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
|
@ -215,6 +211,15 @@ function getDropDownAction(record) {
|
|||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
|
@ -195,6 +195,18 @@ function getTableAction(record) {
|
|||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -203,17 +215,7 @@ function getTableAction(record) {
|
|||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: '指令标签',
|
||||
title: '分类标签',
|
||||
align: 'center',
|
||||
dataIndex: 'instructionTagId_dictText',
|
||||
width: 100,
|
||||
|
@ -133,9 +133,9 @@ export const columns: BasicColumn[] = [
|
|||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
categoryId: { title: '服务类别id', order: 0, view: 'list', type: 'string', dictCode: '' },
|
||||
typeId: { title: '服务类型id', order: 1, view: 'list', type: 'string', dictCode: '' },
|
||||
instructionTagId: { title: '指令标签id', order: 2, view: 'list', type: 'string', dictCode: 'instruction_tag' },
|
||||
categoryId: { title: '服务类别', order: 0, view: 'list', type: 'string', dictCode: '' },
|
||||
typeId: { title: '服务类型', order: 1, view: 'list', type: 'string', dictCode: '' },
|
||||
instructionTagId: { title: '分类标签', order: 2, view: 'list', type: 'string', dictCode: 'instruction_tag' },
|
||||
directiveName: { title: '服务指令名称', order: 3, view: 'text', type: 'string' },
|
||||
tollPrice: { title: '收费价格', order: 4, view: 'number', type: 'number' },
|
||||
comPrice: { title: '提成价格', order: 5, view: 'number', type: 'number' },
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<a-form-item name="categoryId">
|
||||
<template #label><span title="服务类别">服务类别</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0`"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 order by sort asc`"
|
||||
placeholder="请选择服务类别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<a-form-item name="typeId">
|
||||
<template #label><span title="服务类型">服务类型</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.typeId"
|
||||
:dictCode="`config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0`" placeholder="请选择服务类型"
|
||||
:dictCode="`config_service_type,type_name,id,del_flag = 0 order by sort asc`" placeholder="请选择服务类型"
|
||||
allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="directiveName">
|
||||
<template #label><span title="服务指令">服务指令</span></template>
|
||||
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear/>
|
||||
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="6">
|
||||
|
@ -79,7 +79,7 @@
|
|||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allowClear/>
|
||||
placeholder="请选择是否启用" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
|
@ -210,7 +210,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
|
@ -247,7 +247,7 @@ const superQueryConfig = reactive(superQuerySchema);
|
|||
|
||||
const categoryOpen = ref(false)//服务类别抽屉
|
||||
const typeOpen = ref(false)//服务类型抽屉
|
||||
const tagOpen =ref(false)//指令标签抽屉
|
||||
const tagOpen = ref(false)//指令标签抽屉
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
|
@ -313,16 +313,7 @@ function getTableAction(record) {
|
|||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'serviceDirective:config_service_directive:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
}, {
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
|
@ -334,6 +325,15 @@ function getDropDownAction(record) {
|
|||
},
|
||||
auth: 'serviceDirective:config_service_directive:delete'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -5,93 +5,105 @@
|
|||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="ConfigServiceDirectiveForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
|
||||
name="categoryId">
|
||||
<j-dict-select-tag type="list" v-model:value="formData.categoryId"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0`"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 order by sort asc`"
|
||||
placeholder="请选择服务类别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
|
||||
name="typeId">
|
||||
<j-dict-select-tag type="list" v-model:value="formData.typeId"
|
||||
:dictCode="`config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0`" placeholder="请选择服务类型"
|
||||
:dictCode="`config_service_type,type_name,id,del_flag = 0 order by sort asc`" placeholder="请选择服务类型"
|
||||
allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="指令标签" v-bind="validateInfos.instructionTagId"
|
||||
<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" dictCode="instruction_tag"
|
||||
placeholder="请选择指令标签" allowClear />
|
||||
placeholder="请选择分类标签" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="收费价格" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
|
||||
name="tollPrice">
|
||||
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="提成价格" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
|
||||
name="comPrice">
|
||||
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="医保报销" v-bind="validateInfos.izReimbursement"
|
||||
id="ConfigServiceDirectiveForm-izReimbursement" name="izReimbursement">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izReimbursement" dictCode="med_ins_reimb"
|
||||
allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="机构优惠" v-bind="validateInfos.izPreferential"
|
||||
id="ConfigServiceDirectiveForm-izPreferential" name="izPreferential">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izPreferential"
|
||||
dictCode="institutional_discount" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="收费频次" v-bind="validateInfos.chargingFrequency"
|
||||
id="ConfigServiceDirectiveForm-chargingFrequency" name="chargingFrequency">
|
||||
<j-dict-select-tag type="list" v-model:value="formData.chargingFrequency" dictCode="billing_frequency"
|
||||
placeholder="请选择收费频次" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="ConfigServiceDirectiveForm-cycleType"
|
||||
name="cycleType">
|
||||
<j-dict-select-tag type="list" v-model:value="formData.cycleType" dictCode="period_type"
|
||||
placeholder="请选择周期类型" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="排序" v-bind="validateInfos.sort" id="ConfigServiceDirectiveForm-sort" name="sort">
|
||||
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务说明" v-bind="validateInfos.serviceContent"
|
||||
id="ConfigServiceDirectiveForm-serviceContent" name="serviceContent">
|
||||
<a-textarea v-model:value="formData.serviceContent" :rows="4" placeholder="请输入服务说明" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="请输入服务时长(分钟)" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="1" placeholder="请输入服务说明" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File"
|
||||
name="mp3File">
|
||||
<j-upload v-model:value="formData.mp3File" accept="audio/*"></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="ConfigServiceDirectiveForm-mp4File"
|
||||
name="mp4File">
|
||||
<j-upload v-model:value="formData.mp4File" accept="video/*"></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="排序" v-bind="validateInfos.sort" id="ConfigServiceDirectiveForm-sort" name="sort">
|
||||
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigServiceDirectiveForm-izEnabled"
|
||||
name="izEnabled">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
|
@ -99,37 +111,32 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="ConfigServiceDirectiveForm-mp3File"
|
||||
name="mp3File">
|
||||
<j-upload v-model:value="formData.mp3File" accept="audio/*"></j-upload>
|
||||
<a-form-item label="指令标签" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
|
||||
name="typeId">
|
||||
<JCheckbox v-model:value="formData.tags"
|
||||
:dictCode="`config_directive_tag,tag_name,id,del_flag = 0 order by sort asc`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="ConfigServiceDirectiveForm-mp4File"
|
||||
name="mp4File">
|
||||
<j-upload v-model:value="formData.mp4File" accept="video/*"></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="创建人" v-bind="validateInfos.createBy" id="ConfigServiceDirectiveForm-createBy"
|
||||
name="createBy">
|
||||
<a-input v-model:value="formData.createBy" placeholder="请输入创建人" disabled allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="ConfigServiceDirectiveForm-createTime"
|
||||
name="createTime">
|
||||
<a-date-picker placeholder="请选择创建日期" v-model:value="formData.createTime" showTime
|
||||
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="更新人" v-bind="validateInfos.updateBy" id="ConfigServiceDirectiveForm-updateBy"
|
||||
name="updateBy">
|
||||
<a-input v-model:value="formData.updateBy" placeholder="请输入更新人" disabled allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="更新日期" v-bind="validateInfos.updateTime" id="ConfigServiceDirectiveForm-updateTime"
|
||||
name="updateTime">
|
||||
<a-date-picker placeholder="请选择更新日期" v-model:value="formData.updateTime" showTime
|
||||
|
@ -148,6 +155,7 @@ import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { JCheckbox } from '/@/components/Form';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ConfigServiceDirective.api';
|
||||
|
@ -185,14 +193,16 @@ const formData = reactive<Record<string, any>>({
|
|||
mp4File: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
categoryId: [{ required: true, message: '请选择服务类别!' },],
|
||||
typeId: [{ required: true, message: '请选择服务类型!' },],
|
||||
instructionTagId: [{ required: true, message: '请选择指令标签!' },],
|
||||
instructionTagId: [{ required: true, message: '请选择分类标签!' },],
|
||||
directiveName: [{ required: true, message: '请输入服务指令名称!' },],
|
||||
tollPrice: [{ required: true, message: '请输入收费价格!' }, { pattern: /^(([0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },],
|
||||
comPrice: [{ required: false }, { pattern: /^(([0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!' },],
|
||||
|
@ -200,12 +210,11 @@ const validatorRules = reactive({
|
|||
izPreferential: [{ required: true, message: '请选择是否参与机构优惠!' },],
|
||||
chargingFrequency: [{ required: true, message: '请选择收费频次!' },],
|
||||
cycleType: [{ required: true, message: '请选择周期类型!' },],
|
||||
sort: [{ required: true, message: '请输入排序!'}, { pattern: /^\d+$/, message: '请输入正整数!'},],
|
||||
sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入正整数!' },],
|
||||
serviceDuration: [{ required: true, message: '请输入服务时长(分钟)!' }, { pattern: /^\d+$/, message: '请输入正整数!' },],
|
||||
izEnabled: [{ required: true, message: '请选择是否启用!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
|
@ -230,6 +239,7 @@ function add() {
|
|||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
formData.tags = ''
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭" :maskClosable="false">
|
||||
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭" :maskClosable="false">
|
||||
<ConfigServiceDirectiveForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ConfigServiceDirectiveForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
@ -11,7 +11,6 @@
|
|||
import { array } from 'vue-types';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<a-form-item name="categoryId">
|
||||
<template #label><span title="服务类别">服务类别</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.categoryId"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0`"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 order by sort asc`"
|
||||
placeholder="请选择服务类别" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
@ -106,7 +106,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
|
@ -205,16 +205,7 @@ function getTableAction(record) {
|
|||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
}, {
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
|
@ -225,6 +216,15 @@ function getDropDownAction(record) {
|
|||
placement: 'topLeft',
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceTypeForm-categoryId"
|
||||
name="categoryId">
|
||||
<j-dict-select-tag type='list' v-model:value="formData.categoryId"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0`"
|
||||
:dictCode="`config_service_category,category_name,id,del_flag = 0 order by sort asc`"
|
||||
placeholder="请选择服务类别" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
];
|
||||
}
|
||||
function getRowClassName(record) {
|
||||
return record.status == 0 ? prefixCls : '';
|
||||
return record.status == 1 ? prefixCls : '';
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
|
|
|
@ -192,7 +192,7 @@ export const itemFormSchema: FormSchema[] = [
|
|||
{
|
||||
field: 'status',
|
||||
label: '是否启用',
|
||||
defaultValue: 1,
|
||||
defaultValue: 0,
|
||||
component: 'JDictSelectTag',
|
||||
componentProps: {
|
||||
type: 'radioButton',
|
||||
|
|
Loading…
Reference in New Issue