diff --git a/src/components/Form/src/jeecg/components/JDictSelectTag.vue b/src/components/Form/src/jeecg/components/JDictSelectTag.vue index 9cd3eec..969e712 100644 --- a/src/components/Form/src/jeecg/components/JDictSelectTag.vue +++ b/src/components/Form/src/jeecg/components/JDictSelectTag.vue @@ -79,7 +79,7 @@ export default defineComponent({ ignoreDisabled: propTypes.bool.def(false), orgCode: '',//组织机构编码 会切换数据源 }, - emits: ['options-change', 'change', 'update:value', 'upDictCode'], + emits: ['options-change', 'change', 'update:value', 'upDictCode', 'currentText'], setup(props, { emit, refs }) { const dictOptions = ref([]); const attrs = useAttrs(); @@ -163,6 +163,11 @@ export default defineComponent({ } } else { changeValue = e?.target?.value ?? e; + if (!e) { + emit('currentText', null) + } else { + emit('currentText', dictOptions.value.filter(item => item.value == changeValue)[0].label) + } } state.value = changeValue; diff --git a/src/views/flow/ServiceFlowMain.api.ts b/src/views/flow/ServiceFlowMain.api.ts new file mode 100644 index 0000000..84c94b6 --- /dev/null +++ b/src/views/flow/ServiceFlowMain.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/services/flow/main/list', + save='/services/flow/main/add', + edit='/services/flow/main/edit', + deleteOne = '/services/flow/main/delete', + deleteBatch = '/services/flow/main/deleteBatch', + importExcel = '/services/flow/main/importExcel', + exportXls = '/services/flow/main/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/flow/ServiceFlowMain.data.ts b/src/views/flow/ServiceFlowMain.data.ts new file mode 100644 index 0000000..469c927 --- /dev/null +++ b/src/views/flow/ServiceFlowMain.data.ts @@ -0,0 +1,58 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '流程名称', + align: 'center', + dataIndex: 'flowName', + }, + { + title: '分类标签', + align: 'center', + dataIndex: 'instructionTagId_dictText', + }, + { + title: '服务类别', + align: 'center', + dataIndex: 'categoryId_dictText', + }, + { + title: '服务类型', + align: 'center', + dataIndex: 'typeId_dictText', + }, + { + title: '是否启用', + align: 'center', + dataIndex: 'izEnabled_dictText', + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + flowName: { title: '节点名称', order: 0, view: 'text', type: 'string' }, + izEnabled: { title: '是否启用', order: 1, view: 'list', type: 'string', dictCode: 'iz_enabled' }, + instructionTagId: { + title: '分类标签', + order: 2, + view: 'list', + type: 'string', + dictTable: 'nu_config_service_instruction_tag', + dictCode: 'id', + dictText: 'instruction_name', + }, + categoryId: { + title: '服务类别', + order: 3, + view: 'list', + type: 'string', + dictTable: 'nu_config_service_category', + dictCode: 'id', + dictText: 'category_name', + }, + typeId: { title: '服务类型', order: 4, view: 'list', type: 'string', dictTable: 'nu_config_service_type', dictCode: 'id', dictText: 'type_name' }, +}; diff --git a/src/views/flow/ServiceFlowMainList.vue b/src/views/flow/ServiceFlowMainList.vue new file mode 100644 index 0000000..9f30c20 --- /dev/null +++ b/src/views/flow/ServiceFlowMainList.vue @@ -0,0 +1,294 @@ + + + + + diff --git a/src/views/flow/components/ServiceFlowMainForm.vue b/src/views/flow/components/ServiceFlowMainForm.vue new file mode 100644 index 0000000..3d980bd --- /dev/null +++ b/src/views/flow/components/ServiceFlowMainForm.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/flow/components/ServiceFlowMainModal.vue b/src/views/flow/components/ServiceFlowMainModal.vue new file mode 100644 index 0000000..af9df69 --- /dev/null +++ b/src/views/flow/components/ServiceFlowMainModal.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/src/views/flow/components/ServiceFlowSub.api.ts b/src/views/flow/components/ServiceFlowSub.api.ts new file mode 100644 index 0000000..b574731 --- /dev/null +++ b/src/views/flow/components/ServiceFlowSub.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/services/flow/sub/list', + save='/services/flow/sub/add', + edit='/services/flow/sub/edit', + deleteOne = '/services/flow/sub/delete', + deleteBatch = '/services/flow/sub/deleteBatch', + importExcel = '/services/flow/sub/importExcel', + exportXls = '/services/flow/sub/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/flow/components/ServiceFlowSub.data.ts b/src/views/flow/components/ServiceFlowSub.data.ts new file mode 100644 index 0000000..30ebf9b --- /dev/null +++ b/src/views/flow/components/ServiceFlowSub.data.ts @@ -0,0 +1,67 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '节点名称', + align: 'center', + dataIndex: 'name', + }, + { + title: '流程编码', + align: 'center', + dataIndex: 'flowCode', + }, + { + title: '下一流程节点', + align: 'center', + dataIndex: 'subId_dictText', + }, + { + title: '服务指令', + align: 'center', + dataIndex: 'directiveId_dictText', + }, + { + title: '是否启用', + align: 'center', + dataIndex: 'izEnabled_dictText', + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + name: { title: '名称', order: 0, view: 'text', type: 'string' }, + mainId: { + title: '主表ID', + order: 1, + view: 'sel_search', + type: 'string', + dictTable: 'nu_config_service_flow_main', + dictCode: 'id', + dictText: 'flow_name', + }, + directiveId: { + title: '服务指令ID', + order: 2, + view: 'sel_search', + type: 'string', + dictTable: 'nu_config_service_directive', + dictCode: 'id', + dictText: 'directive_name', + }, + subId: { + title: '下一流程节点ID', + order: 3, + view: 'sel_search', + type: 'string', + dictTable: 'nu_config_service_flow_sub', + dictCode: 'id', + dictText: 'name', + }, + flowCode: { title: '流程编码', order: 4, view: 'text', type: 'string' }, + izEnabled: { title: '是否启用 Y启用 N未启用', order: 5, view: 'list', type: 'string', dictCode: 'iz_enabled' }, +}; diff --git a/src/views/flow/components/ServiceFlowSubForm.vue b/src/views/flow/components/ServiceFlowSubForm.vue new file mode 100644 index 0000000..8bf9188 --- /dev/null +++ b/src/views/flow/components/ServiceFlowSubForm.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/views/flow/components/ServiceFlowSubList.vue b/src/views/flow/components/ServiceFlowSubList.vue new file mode 100644 index 0000000..9be7ba2 --- /dev/null +++ b/src/views/flow/components/ServiceFlowSubList.vue @@ -0,0 +1,437 @@ + + + + + diff --git a/src/views/flow/components/ServiceFlowSubModal.vue b/src/views/flow/components/ServiceFlowSubModal.vue new file mode 100644 index 0000000..f0ad77a --- /dev/null +++ b/src/views/flow/components/ServiceFlowSubModal.vue @@ -0,0 +1,84 @@ + + + + + + diff --git a/src/views/services/instructiontag/components/InstructionTagForm.vue b/src/views/services/instructiontag/components/InstructionTagForm.vue index f15c73b..28800b7 100644 --- a/src/views/services/instructiontag/components/InstructionTagForm.vue +++ b/src/views/services/instructiontag/components/InstructionTagForm.vue @@ -5,19 +5,19 @@ - + - + + :dictCode="`view_directive_can_use_instruction_tag,item_text,item_value`" placeholder="请选择分类标签" + allowClear @currentText="selectedFunc" /> - + @@ -53,7 +53,7 @@ import { getValueType } from '/@/utils'; import { saveOrUpdate } from '../InstructionTag.api'; import { Form } from 'ant-design-vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; - import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index'; +import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index'; import { b } from 'node_modules/vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P'; const props = defineProps({ formDisabled: { type: Boolean, default: false }, @@ -70,7 +70,7 @@ const formData = reactive>({ instructionType: '', sort: 99, izEnabled: 'Y', - icon:'', + icon: '', }); const { createMessage } = useMessage(); const labelCol = ref({ xs: { span: 24 }, sm: { span: 5 } }); @@ -78,7 +78,7 @@ const wrapperCol = ref({ xs: { span: 24 }, sm: { span: 16 } }); const confirmLoading = ref(false); //表单验证 const validatorRules = reactive({ - instructionName: [{ required: true, message: '请输入分类标签名称!' },], + // instructionName: [{ required: true, message: '请输入分类标签名称!' },], instructionType: [{ required: true, message: '请选择分类标签类型!' },], sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入正整数!' },], icon: [{ required: true, message: '请选择图标!' }], @@ -123,9 +123,9 @@ function edit(record) { Object.assign(formData, tmpData); formData.instructionName = record.title; formData.id = record.key; - if(record.title){ + if (record.title) { titleDisabled.value = true; - }else{ + } else { titleDisabled.value = false; } }); @@ -179,6 +179,13 @@ async function submitForm() { }); } +/** + * 类型选择结果 + * @param v_ + */ +function selectedFunc(v_) { + formData.instructionName = v_ +} defineExpose({ add, diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList copy.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList copy.vue new file mode 100644 index 0000000..5f347db --- /dev/null +++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList copy.vue @@ -0,0 +1,1562 @@ + + + + + diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue index 5f347db..2f72537 100644 --- a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue +++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue @@ -82,9 +82,6 @@