修改指标集跳转到指标管理界面携带参数

main
于阔 9 months ago
parent 81fadef540
commit 3720832246

@ -38,6 +38,7 @@
"axios": "^1.5.1",
"base64-js": "~1.5.1",
"dayjs": "^1.11.10",
"docx-preview": "^0.3.2",
"driver.js": "^1.3.0",
"echarts": "^5.4.3",
"echarts-wordcloud": "^2.1.0",
@ -48,6 +49,7 @@
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"pdfjs-dist": "^2.11.338",
"pinia": "^2.1.7",
"pinia-plugin-persist": "^1.0.0",
"qrcode": "^1.5.3",

@ -140,8 +140,8 @@ init();
}
.download{
position: absolute;
font-size:1.3rem;
top:13px;
font-size:1.2rem;
top:15px;
right:15px;
}
#docx-container {

@ -0,0 +1,23 @@
<script setup lang="tsx">
import { ElTabs,ElTabPane } from 'element-plus';
import ProcedureConfig from './components/ProcedureConfig.vue';
import ParamConfig from './components/ParamConfig.vue';
import BasicInfo from './components/BasicInfo.vue';
</script>
<template>
<ContentWrap>
<ElTabs tab-position="left" style="height: 200px">
<ElTabPane label="存储过程">
<ProcedureConfig ref="procedureConfig" />
</ElTabPane>
<ElTabPane label="参数配置">
<ParamConfig ref="paramConfig" />
</ElTabPane>
<ElTabPane label="基本信息">
<BasicInfo ref="basicInfo" />
</ElTabPane>
</ElTabs>
</ContentWrap>
</template>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,23 @@
<script setup lang="tsx">
import { elTabs,elTabPane } from 'element-plus';
import SQLRule from './components/SQLRule.vue';
import SetParams from './components/SetParams.vue';
import BasicInfo from './components/BasicInfo.vue';
</script>
<template>
<ContentWrap>
<elTabs tab-position="left" style="height: 200px">
<elTabPane label="SQL">
<SQLRule ref="sqlRule" />
</elTabPane>
<elTabPane label="参数配置">
<SetParams ref="setParams" />
</elTabPane>
<elTabPane label="基本信息">
<BasicInfo ref="basicInfo" />
</elTabPane>
</elTabs>
</ContentWrap>
</template>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,31 @@
<script setup lang="tsx">
import { elTabs,elTabPane } from 'element-plus';
import SearchStucter from './components/SearchStucter.vue';
import ParamConfig from './components/ParamConfig.vue';
import FieldInfo from './components/FieldInfo.vue';
import TargetPeek from './components/TargetPeek.vue'
import BasicInfo from './components/BasicInfo.vue';
</script>
<template>
<ContentWrap>
<elTabs tab-position="left" style="height: 200px">
<elTabPane label="查询结构">
<SearchStucter ref="searchStucter" />
</elTabPane>
<elTabPane label="参数配置">
<ParamConfig ref="paramConfig" />
</elTabPane>
<elTabPane label="字段信息">
<FieldInfo ref="fieldInfo" />
</elTabPane>
<elTabPane label="指标取数">
<TargetPeek ref="targetPeek" />
</elTabPane>
<elTabPane label="基本信息">
<BasicInfo ref="basicInfo" />
</elTabPane>
</elTabs>
</ContentWrap>
</template>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -0,0 +1,105 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType,ref,reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import { ElDialog } from 'element-plus'ss
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<any>,
default: () => null
}
})
let showCron = ref(false);
let NewCornData = "";//corn
const formSchema = reactive<FormSchema[]>([
{
field: 'cron',
label: '定时器信息',
component: 'Input',
colProps: {
span: 24
},
componentProps:{
value:"",
on:{
click:()=>{
NewCornData = formSchema[0].value;
showCron.value = true;
}
}
}
},
])
const rules = reactive({
cron:[required()],
})
const { formRegister, formMethods } = useForm()
const { setValues,getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData();
formData.cron = formSchema[0].value;
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
//
const changeCron = (corn)=>{
formSchema[0].value = corn.toString();
formSchema[0].componentProps.value = corn.toString();
if(formSchema[0].value != '[object Event]'){
NewCornData = formSchema[0].value
}
}
const closeDialog = ()=>{
if(NewCornData != formSchema[0].value){
formSchema[0].value = NewCornData;
formSchema[0].componentProps.value = NewCornData;
}
showCron.value = false;
}
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ElDialog v-model="showCron">
<vue3CronPlus
i18n="cn"
@change="changeCron"
@close="closeDialog"
max-height="300px"
/>
</ElDialog>
</template>
<style scoped>
.vue3-cron-plus-container>>>.language{
top:40px !important;
}
</style>

@ -24,6 +24,7 @@ import { getWidth } from '@/utils';
import { Upload } from '@/components/Upload'
import { saveRepDataProblemApi } from '@/api/reporting/RepDataProblem/RepDataProblem'
import {useRoute} from "vue-router"
const route = useRoute();
const pageQuery = ref(route || null);
const indexsetCode = pageQuery.value?.query?.indexsetCode;
@ -67,7 +68,7 @@ const tableColumns = reactive<TableColumn[]>([
field: 'indexsetCode',
label: '指标集编码',
hidden:true,
value:indexsetCode
},
{
field: 'code',

@ -23,6 +23,12 @@ import { getWidth } from '@/utils';
import Detail from './components/Detail.vue'
import { Upload } from '@/components/Upload'
import {useRoute} from "vue-router"
const route = useRoute();
const pageQuery = ref(route || null);
const indexsetCode = pageQuery.value?.query?.indexsetCode;
const { t } = useI18n()
const ids = ref<string[]>([])
@ -138,6 +144,7 @@ const setSearchParams = (data: any) => {
searchParams.value = data
getList()
}
setSearchParams({indexsetCode:indexsetCode});
const dialogVisible = ref(false)
const dialogTitle = ref('')

@ -14,10 +14,14 @@ import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-pl
import { ContentWrap } from '@/components/ContentWrap'
import CodeRepItem from '@/views/dataset/CodeRepItem/CodeRepItem.vue';//
import CodeRepTarget from '@/views/dataset/CodeRepTarget/CodeRepTarget.vue';//
import Write from './components/Write.vue'
import { Dialog } from '@/components/Dialog'
import {useRoute} from 'vue-router';
const route = useRoute();
const pageQuery = ref(route || null);
const indexsetCode = pageQuery.value?.query?.indexsetCode;
const { t } = useI18n()
/**
* 指标定义
@ -111,10 +115,10 @@ const handleClick=(tab: any, event: Event | undefined)=> {
<ContentWrap>
<ElTabs v-model="activeName" type="" @tab-click="handleClick">
<ElTabPane label="指标定义" name="indexDefination">
<CodeRepItem />
<CodeRepItem :indexset-code="indexsetCode" />
</ElTabPane>
<ElTabPane label="指标属性" name="indexProperties">
<CodeRepTarget />
<CodeRepTarget :indexset-code="indexsetCode" />
</ElTabPane>
</ElTabs>
</ContentWrap>

@ -41,7 +41,7 @@ let frequency_param_LIST = ref([]);
//
const getDictInfoList = async ()=>{
const res = await getIndexType({ paramName: 'frequency_param', systemCode: 'ordb' });
frequency_param_LIST = transfDictList(res.body.result);
frequency_param_LIST.value = transfDictList(res.body.result);
}
getDictInfoList();
@ -98,8 +98,7 @@ const tableColumns = reactive<TableColumn[]>([
label: '频度',
slots:{
default:(data)=>{
console.log(data.row.frequency,frequency_param_LIST[data.row.frequency].label);
return <span>{frequency_param_LIST[data.row.frequency].label}</span>
return <span>{data.row.frequency?frequency_param_LIST.value[data.row.frequency]?.label:''}</span>
}
}
},
@ -115,7 +114,7 @@ const tableColumns = reactive<TableColumn[]>([
const node = indexType_param_LIST.value.filter(item=>{
return item.id == data.row.indexsetType
})[0];
return <span>{node?node.nodeName:''}</span>
return <span>{node?node?.nodeName:''}</span>
}
}
},
@ -266,7 +265,6 @@ const action = async (row: TableData, type: string) => {
/** 指标集数据配置 **/
const getDataConfig = (data)=>{
console.log(data);
router.push({
name:'indexMannageMs',
query:{

@ -13,7 +13,7 @@ import { TableData } from '@/api/dataset/RepSetRule/types'
import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n'
import { Table, TableColumn } from '@/components/Table'
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage,ElDropdown,ElDropdownMenu,ElDropdownItem } from 'element-plus'
import { Search } from '@/components/Search'
import { FormSchema } from '@/components/Form'
import { ContentWrap } from '@/components/ContentWrap'
@ -229,8 +229,9 @@ const action = async (row: TableData, type: string) => {
dialogVisible.value = true
}
}
const AddAction = () => {
let RuleType = ref('');
const AddAction = (ruleType: string) => {
RuleType.value = ruleType;
dialogTitle.value = t('tableDemo.add')
currentRow.value = undefined
dialogVisible.value = true
@ -316,7 +317,18 @@ const exportExcel = async () => {
@refresh="refresh"
>
<template #buttons>
<ElButton type="primary" @click="AddAction">{{ t('tableDemo.add') }}</ElButton>
<ElDropdown placement="bottom">
<ElButton type="primary">{{ t('tableDemo.add') }}</ElButton>
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem @click="AddAction('ProcedureRule')"></ElDropdownItem>
<ElDropdownItem @click="AddAction('SqlRule')">SQL</ElDropdownItem>
<ElDropdownItem @click="AddAction('PureSqlRule')"></ElDropdownItem>
</ElDropdownMenu>
</template>
</ElDropdown>
<Upload :url="importExcelApiUrl" :callback="getList"> <ElButton type="primary">导入</ElButton> </Upload>
<ElButton type="primary" @click="exportExcel()"></ElButton>
<ElButton :loading="delLoading" type="primary" :disabled="disabled" @click="delDataBatch()">
@ -332,6 +344,7 @@ const exportExcel = async () => {
ref="writeRef"
:current-row="currentRow"
:action-type="actionType"
:rule-type="RuleType"
/>
<Detail v-if="actionType === 'detail'" :current-row="currentRow" />
<template #footer>

@ -1,11 +1,10 @@
<script setup lang="tsx">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType, reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator'
import dayjs from 'dayjs'
import { elTabs,elTabPane } from 'element-plus';
import ProcedureRule from '@/views/IndexProcess/ProcedureRule/ProcedureRule.vue';
import SqlRule from '@/views/IndexProcess/SqlRule/SqlRule.vue';
import PureSqlRule from '@/view/IndexProcess/PureSqlRule/PureSqlRule.vue'
const { required } = useValidator()
const props = defineProps({
currentRow: {
@ -15,198 +14,21 @@ const props = defineProps({
actionType: {
type: String,
default: 'add'
}
})
const { formRegister, formMethods } = useForm()
const { setValues, getFormData, getElFormExpose } = formMethods
const formSchema = reactive<FormSchema[]>([
{
field: 'ruleCode',
label: '指标集规则清单编码',
component: 'Input'
},{
field: 'ruleName',
label: '规则名称',
component: 'Input',
componentProps: {
},
},
{
field: 'ruleClass',
label: '规则分类',
component: 'Select',
componentProps: {
},
},
{
field: 'startDate',
label: '启用日期',
component: 'DatePicker',
componentProps: {
},
},
{
field: 'ruleProperty',
label: '规则属性',
component: 'Input',
componentProps: {
},
},
{
field: 'ruleCycle',
label: '规则周期',
component: 'Input',
componentProps: {
},
},
{
field: 'ruleStatus',
label: '是否有效',
component: 'Input',
componentProps: {
},
},
{
field: 'description',
label: '规则描述',
component: 'Input',
componentProps: {
},
},
{
field: 'createDate',
label: '创建日期',
component: 'Input',
componentProps: {
},
},
{
field: 'createAccount',
label: '创建账户',
component: 'Input',
componentProps: {
},
},
{
field: 'createOrgan',
label: '创建机构',
component: 'Input',
componentProps: {
},
},
{
field: 'ruleJson',
label: '规则json',
component: 'Input',
componentProps: {
},
},
{
field: 'ruleSql',
label: '规则sql',
component: 'Input',
componentProps: {
},
},
{
field: 'organCode',
label: '机构编码',
component: 'Input',
componentProps: {
},
},
{
field: 'failDate',
label: '失效日期',
component: 'Input',
componentProps: {
},
},
{
field: 'indexCode',
label: '规则加工指标集编号',
component: 'Input',
componentProps: {
},
},
{
field: 'machFormulas',
label: '规则加载所有公式',
component: 'Input',
componentProps: {
},
},
{
field: 'itemId',
label: '指标代码',
component: 'Input',
componentProps: {
},
},
{
field: 'itemName',
label: '指标名称',
component: 'Input',
componentProps: {
},
ruleType:{
type: String,
default: 'ProcedureRule'
}
])
const rules = reactive({
})
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData()
const { startDate } = formData;
Object.assign(formData, { startDate: dayjs(startDate).format('YYYY-MM-DD') })
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
<ContentWrap>
<ProcedureRule />
<SqlRule />
<PureSqlRule />
</ContentWrap>
</template>

@ -1,20 +0,0 @@
<script setup lang="ts">
import { PropType } from 'vue'
import type { TableData } from '@/api/table/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
defineProps({
currentRow: {
type: Object as PropType<Nullable<TableData>>,
default: () => null
},
detailSchema: {
type: Array as PropType<DescriptionsSchema[]>,
default: () => []
}
})
</script>
<template>
<Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>

@ -1,63 +0,0 @@
<script setup lang="ts">
import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm'
import { PropType, reactive, watch } from 'vue'
import { TableData } from '@/api/table/types'
import { useValidator } from '@/hooks/web/useValidator'
const { required } = useValidator()
const props = defineProps({
currentRow: {
type: Object as PropType<Nullable<TableData>>,
default: () => null
},
formSchema: {
type: Array as PropType<FormSchema[]>,
default: () => []
}
})
const rules = reactive({
title: [required()],
author: [required()],
importance: [required()],
pageviews: [required()],
display_time: [required()],
content: [required()]
})
const { formRegister, formMethods } = useForm()
const { setValues, getFormData, getElFormExpose } = formMethods
const submit = async () => {
const elForm = await getElFormExpose()
const valid = await elForm?.validate().catch((err) => {
console.log(err)
})
if (valid) {
const formData = await getFormData()
return formData
}
}
watch(
() => props.currentRow,
(currentRow) => {
if (!currentRow) return
setValues(currentRow)
},
{
deep: true,
immediate: true
}
)
defineExpose({
submit
})
</script>
<template>
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
</template>

@ -1,255 +0,0 @@
<script setup lang="tsx">
import { ContentWrap } from '@/components/ContentWrap'
import { Search } from '@/components/Search'
import { Dialog } from '@/components/Dialog'
import { useI18n } from '@/hooks/web/useI18n'
import { ElButton, ElTag, ElLink, ElPopconfirm } from 'element-plus'
import { Table } from '@/components/Table'
import { getTableListApi, saveTableApi, delTableListApi } from '@/api/table'
import { useTable } from '@/hooks/web/useTable'
import { TableData } from '@/api/table/types'
import { ref, unref, reactive } from 'vue'
import Write from './components/Write.vue'
import Detail from './components/Detail.vue'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
defineOptions({
name: 'Demo'
})
const ids = ref<string[]>([])
const { tableRegister, tableState, tableMethods } = useTable({
fetchDataApi: async () => {
const { currentPage, pageSize } = tableState
const res = await getTableListApi({
pageNum: unref(currentPage),
pageSize: unref(pageSize),
...unref(searchParams)
})
return {
list: res.data.list,
total: res.data.total
}
},
fetchDelApi: async () => {
const res = await delTableListApi(unref(ids))
return !!res
}
})
const { loading, dataList, total, currentPage, pageSize } = tableState
const { getList, getElTableExpose, delList, refresh } = tableMethods
const searchParams = ref({})
const setSearchParams = (params: any) => {
searchParams.value = params
getList()
}
const { t } = useI18n()
const crudSchemas = reactive<CrudSchema[]>([
{
field: 'selection',
search: {
hidden: true
},
form: {
hidden: true
},
detail: {
hidden: true
},
table: {
type: 'selection'
}
},
{
field: 'index',
label: t('tableDemo.index'),
type: 'index',
search: {
hidden: true
},
form: {
hidden: true
},
detail: {
hidden: true
}
},
{
field: 'title',
label: t('tableDemo.title'),
search: {
component: 'Input'
},
form: {
component: 'Input',
colProps: {
span: 24
}
},
detail: {
span: 24
}
},
{
field: 'action',
width: '260px',
label: t('tableDemo.action'),
search: {
hidden: true
},
form: {
hidden: true
},
detail: {
hidden: true
},
table: {
slots: {
default: (data: any) => {
return (
<>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
{t('exampleDemo.edit')}
</ElLink>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'detail')}>
{t('exampleDemo.detail')}
</ElLink>
<ElPopconfirm
title={t('common.delTableMsg')}
width={200}
v-slots={{
reference: () => {
return (
<>
<ElLink type="primary" underline={false}>
{t('exampleDemo.del')}
</ElLink>
</>
)
}
}}
onConfirm={() => delData(data.row)}
></ElPopconfirm>
</>
)
}
}
}
}
])
// @ts-ignore
const { allSchemas } = useCrudSchemas(crudSchemas)
const dialogVisible = ref(false)
const dialogTitle = ref('')
const currentRow = ref<TableData | null>(null)
const actionType = ref('')
const AddAction = () => {
dialogTitle.value = t('exampleDemo.add')
currentRow.value = null
dialogVisible.value = true
actionType.value = ''
}
const delLoading = ref(false)
const delData = async (row: TableData | null) => {
const elTableExpose = await getElTableExpose()
ids.value = row ? [row.id] : elTableExpose?.getSelectionRows().map((v: TableData) => v.id) || []
delLoading.value = true
await delList(unref(ids).length).finally(() => {
delLoading.value = false
})
}
const action = (row: TableData, type: string) => {
dialogTitle.value = t(type === 'edit' ? 'exampleDemo.edit' : 'exampleDemo.detail')
actionType.value = type
currentRow.value = row
dialogVisible.value = true
}
const writeRef = ref<ComponentRef<typeof Write>>()
const saveLoading = ref(false)
const save = async () => {
const write = unref(writeRef)
const formData = await write?.submit()
if (formData) {
saveLoading.value = true
const res = await saveTableApi(formData)
.catch(() => {})
.finally(() => {
saveLoading.value = false
})
if (res) {
dialogVisible.value = false
currentPage.value = 1
getList()
}
}
}
const disabled = ref(true)
const onSelectionChange = (selection: any[]) => {
disabled.value = selection.length === 0
}
</script>
<template>
<ContentWrap>
<Search :schema="allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Table
v-model:pageSize="pageSize"
v-model:currentPage="currentPage"
:columns="allSchemas.tableColumns"
:data="dataList"
:loading="loading"
:pagination="{
total: total
}"
@register="tableRegister"
@refresh="refresh"
@selection-change="onSelectionChange"
>
<template #buttons>
<ElButton type="primary" @click="AddAction">{{ t('exampleDemo.add') }}</ElButton>
<ElButton :loading="delLoading" type="primary" :disabled="disabled" @click="delData(null)">
{{ t('exampleDemo.del') }}
</ElButton>
</template>
</Table>
</ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle">
<Write
v-if="actionType !== 'detail'"
ref="writeRef"
:form-schema="allSchemas.formSchema"
:current-row="currentRow"
/>
<Detail
v-if="actionType === 'detail'"
:detail-schema="allSchemas.detailSchema"
:current-row="currentRow"
/>
<template #footer>
<ElButton v-if="actionType !== 'detail'" type="primary" :loading="saveLoading" @click="save">
{{ t('exampleDemo.save') }}
</ElButton>
<ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton>
</template>
</Dialog>
</template>
Loading…
Cancel
Save