修改访问路径
This commit is contained in:
parent
bcfabb7667
commit
122ef7b5a1
|
@ -42,12 +42,18 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<span class="titleOne ellipsis-two-lines">
|
||||||
|
{{ getHHMM(directive.startTimeStr) }}
|
||||||
|
~
|
||||||
|
{{ getHHMM(directive.endTimeStr) }}
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
<a-col :span="24" >
|
<a-col :span="24" >
|
||||||
<a-popover :title="directive.packageName">
|
<a-popover :title="directive.packageName">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="min-width: 240px;">
|
<div style="min-width: 240px;">
|
||||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
|
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
|
||||||
|
|
||||||
<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 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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -83,6 +89,7 @@ import DirectivePackageModal from './components/DirectivePackageModal.vue'
|
||||||
import { list, queryById, deleteOne } from './DirectivePackage.api'
|
import { list, queryById, deleteOne } from './DirectivePackage.api'
|
||||||
import { Pagination } from 'ant-design-vue';
|
import { Pagination } from 'ant-design-vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
const searchForm = ref({})
|
const searchForm = ref({})
|
||||||
|
@ -107,6 +114,15 @@ function handleChangeIzEnabled(record){
|
||||||
searchQuery()
|
searchQuery()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getHHMM(value){
|
||||||
|
if(value){
|
||||||
|
return dayjs(value).format('HH:mm')
|
||||||
|
}else{
|
||||||
|
return '未配置'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 搜索
|
* 搜索
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/services/serviceDirective/configServiceDirective/list',
|
list = '/services/serviceDirective/list',
|
||||||
save='/services/serviceDirective/configServiceDirective/add',
|
save='/services/serviceDirective/add',
|
||||||
edit='/services/serviceDirective/configServiceDirective/edit',
|
edit='/services/serviceDirective/edit',
|
||||||
deleteOne = '/services/serviceDirective/configServiceDirective/delete',
|
deleteOne = '/services/serviceDirective/delete',
|
||||||
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch',
|
deleteBatch = '/services/serviceDirective/deleteBatch',
|
||||||
importExcel = '/services/serviceDirective/configServiceDirective/importExcel',
|
importExcel = '/services/serviceDirective/importExcel',
|
||||||
exportXls = '/services/serviceDirective/configServiceDirective/exportXls',
|
exportXls = '/services/serviceDirective/exportXls',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,24 +11,27 @@
|
||||||
<a-input v-model:value="formData.packageName" placeholder="请输入服务指令包名称" allow-clear></a-input>
|
<a-input v-model:value="formData.packageName" placeholder="请输入服务指令包名称" allow-clear></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="6">
|
||||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="DirectivePackageForm-izEnabled"
|
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="DirectivePackageForm-izEnabled"
|
||||||
name="izEnabled">
|
name="izEnabled">
|
||||||
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||||
placeholder="是否启用" allow-clear />
|
placeholder="是否启用" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="10">
|
||||||
<a-form-item label="备注" v-bind="validateInfos.description" id="DirectivePackageForm-description"
|
<a-form-item label="时间" v-bind="validateInfos.startTimeStr" id="DirectivePackageForm-startTimeStr"
|
||||||
name="description">
|
name="startTimeStr">
|
||||||
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入备注" />
|
<a-time-picker v-model:value="formData.startTimeStr" format="HH:mm" />
|
||||||
|
-
|
||||||
|
<a-time-picker v-model:value="formData.endTimeStr" format="HH:mm" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="排序" v-bind="validateInfos.sort" id="DirectivePackageForm-sort" name="sort">
|
<a-form-item label="说明" v-bind="validateInfos.description" id="DirectivePackageForm-description"
|
||||||
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
|
name="description" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||||
|
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入说明" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col> -->
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -44,6 +47,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
|
||||||
import { getValueType } from '/@/utils';
|
import { getValueType } from '/@/utils';
|
||||||
import { saveOrUpdate } from '../DirectivePackage.api';
|
import { saveOrUpdate } from '../DirectivePackage.api';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
|
import dayjs from "dayjs";
|
||||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
|
@ -59,15 +63,19 @@ const formData = reactive<Record<string, any>>({
|
||||||
description: '',
|
description: '',
|
||||||
sort: 99,
|
sort: 99,
|
||||||
izEnabled: '0',
|
izEnabled: '0',
|
||||||
|
startTimeStr: '',
|
||||||
|
endTimeStr: '',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
|
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 2 } });
|
||||||
|
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 21 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
packageName: [{ required: true, message: '请输入服务指令包名称!' },],
|
// packageName: [{ required: true, message: '请输入服务指令包名称!' },],
|
||||||
sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入整数!' },],
|
// sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入整数!' },],
|
||||||
});
|
});
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
|
@ -103,8 +111,17 @@ function edit(record) {
|
||||||
tmpData[key] = record[key]
|
tmpData[key] = record[key]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log("🚀 ~ nextTick ~ tmpData:", tmpData)
|
||||||
//赋值
|
//赋值
|
||||||
Object.assign(formData, tmpData);
|
Object.assign(formData, tmpData);
|
||||||
|
|
||||||
|
if(formData.startTimeStr){
|
||||||
|
formData.startTimeStr = dayjs(formData.startTimeStr,"YYYY-MM-DD hh:mm:ss")
|
||||||
|
}
|
||||||
|
if(formData.endTimeStr){
|
||||||
|
formData.endTimeStr = dayjs(formData.endTimeStr,"YYYY-MM-DD hh:mm:ss")
|
||||||
|
}
|
||||||
|
console.log("🚀 ~ nextTick ~ formData:", formData)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +162,21 @@ async function submitForm(directives) {
|
||||||
if (directives.length > 0) {
|
if (directives.length > 0) {
|
||||||
model.directives = directives
|
model.directives = directives
|
||||||
}
|
}
|
||||||
|
if(!model.packageName){
|
||||||
|
createMessage.warning('请填写服务指令包名称');
|
||||||
|
confirmLoading.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!model.startTimeStr){
|
||||||
|
createMessage.warning('请选择开始时间');
|
||||||
|
confirmLoading.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!model.endTimeStr){
|
||||||
|
createMessage.warning('请选择结束时间');
|
||||||
|
confirmLoading.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
await saveOrUpdate(model, isUpdate.value)
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
<a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false"
|
<a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false"
|
||||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="21">
|
<a-col :span="18">
|
||||||
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||||
</DirectivePackageForm>
|
</DirectivePackageForm>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="3" style="padding-top: 19px;">
|
<a-col :span="6" style="padding-top: 19px;">
|
||||||
<span style="color: #fff; padding: 8px 10px; background: #dfdfdf; border-radius: 5px;" @click="handleQuoteDirectives">
|
<span style="color: #fff; padding: 8px 10px; background: #dfdfdf; border-radius: 5px;" @click="handleQuoteDirectives">
|
||||||
<Icon icon="ant-design:reconciliation-outlined" /><a href="javascript:void(0);" style="color:#fff;">引用 </a>
|
<Icon icon="ant-design:reconciliation-outlined" /><a href="javascript:void(0);" style="color:#fff;">引用服务指令包</a>
|
||||||
</span>
|
</span>
|
||||||
<span style="color: #43cbd9; padding: 8px 10px; background: #fff; border-radius: 5px;margin-left:10px;border: 1px solid;" @click="handleAddDirectives">
|
<span style="color: #43cbd9; padding: 8px 10px; background: #fff; border-radius: 5px;margin-left:10px;border: 1px solid;" @click="handleAddDirectives">
|
||||||
<Icon icon="ant-design:file-add-outlined" /><a href="javascript:void(0);" style="color:#43cbd9;" >新增</a>
|
<Icon icon="ant-design:file-add-outlined" /><a href="javascript:void(0);" style="color:#43cbd9;" >选择服务指令</a>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<div class="fenleiClass">
|
<div class="fenleiClass">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
分类
|
{{directive.instructionTagName}}
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" style="text-align: right;padding-right: 10px;" v-show="selectedDirective === directive.id">
|
<a-col :span="12" style="text-align: right;padding-right: 10px;" v-show="selectedDirective === directive.id">
|
||||||
<span style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;">
|
<span style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;">
|
||||||
|
|
|
@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/services/serviceDirective/configServiceDirective/list',
|
list = '/services/serviceDirective/list',
|
||||||
save='/services/serviceDirective/configServiceDirective/add',
|
save='/services/serviceDirective/add',
|
||||||
edit='/services/serviceDirective/configServiceDirective/edit',
|
edit='/services/serviceDirective/edit',
|
||||||
deleteOne = '/services/serviceDirective/configServiceDirective/delete',
|
deleteOne = '/services/serviceDirective/delete',
|
||||||
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch',
|
deleteBatch = '/services/serviceDirective/deleteBatch',
|
||||||
importExcel = '/services/serviceDirective/configServiceDirective/importExcel',
|
importExcel = '/services/serviceDirective/importExcel',
|
||||||
exportXls = '/services/serviceDirective/configServiceDirective/exportXls',
|
exportXls = '/services/serviceDirective/exportXls',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue