Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8b74fc76fc
|
|
@ -79,6 +79,12 @@ export default defineComponent({
|
||||||
this.PathNavigatorRef?.moveToPoint(0, 0);
|
this.PathNavigatorRef?.moveToPoint(0, 0);
|
||||||
this.PathNavigatorRef?.stop();
|
this.PathNavigatorRef?.stop();
|
||||||
},
|
},
|
||||||
|
pause() {
|
||||||
|
this.PathNavigatorRef?.pause()
|
||||||
|
},
|
||||||
|
resume() {
|
||||||
|
this.PathNavigatorRef?.resume()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
pathData: {
|
pathData: {
|
||||||
|
|
@ -101,6 +107,6 @@ export default defineComponent({
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
expose: ['start', 'stop']
|
expose: ['start', 'stop', 'pause', 'resume']
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -1,46 +1,60 @@
|
||||||
<template>
|
<template>
|
||||||
<j-table
|
<j-form ref="formRef" :model="modelRef">
|
||||||
rowKey="id"
|
<j-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="dataSource"
|
:data-source="modelRef.dataSource"
|
||||||
bordered
|
:pagination="false"
|
||||||
:pagination="false"
|
>
|
||||||
>
|
<template #bodyCell="{ column, text, record, index }">
|
||||||
<template #bodyCell="{ column, text, record }">
|
<div>
|
||||||
<div>
|
<template
|
||||||
<template v-if="['valueType', 'name'].includes(column.dataIndex)">
|
v-if="['valueType', 'name'].includes(column.dataIndex)"
|
||||||
<span>{{ text }}</span>
|
>
|
||||||
</template>
|
<span>{{ text }}</span>
|
||||||
<template v-else>
|
</template>
|
||||||
<ValueItem
|
<template v-else>
|
||||||
v-model:modelValue="record.value"
|
<j-form-item
|
||||||
:itemType="record.type"
|
:name="['dataSource', index, 'value']"
|
||||||
:options="
|
:rules="[
|
||||||
record.type === 'enum'
|
{
|
||||||
? (record?.dataType?.elements || []).map(
|
required: !!record.required,
|
||||||
(item) => {
|
message: '该字段为必填字段',
|
||||||
return {
|
},
|
||||||
label: item.text,
|
]"
|
||||||
value: item.value,
|
>
|
||||||
};
|
<ValueItem
|
||||||
},
|
v-model:modelValue="record.value"
|
||||||
)
|
:itemType="record.type"
|
||||||
: record.type === 'boolean'
|
style="width: 100%"
|
||||||
? [
|
:options="
|
||||||
{ label: '是', value: true },
|
record.type === 'enum'
|
||||||
{ label: '否', value: false },
|
? (
|
||||||
]
|
record?.dataType?.elements || []
|
||||||
: undefined
|
).map((item) => {
|
||||||
"
|
return {
|
||||||
/>
|
label: item.text,
|
||||||
</template>
|
value: item.value,
|
||||||
</div>
|
};
|
||||||
</template>
|
})
|
||||||
</j-table>
|
: record.type === 'boolean'
|
||||||
|
? [
|
||||||
|
{ label: '是', value: true },
|
||||||
|
{ label: '否', value: false },
|
||||||
|
]
|
||||||
|
: undefined
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</j-form-item>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</j-table>
|
||||||
|
</j-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PropType } from "vue";
|
import { emit } from 'process';
|
||||||
|
import { PropType } from 'vue';
|
||||||
|
|
||||||
type Emits = {
|
type Emits = {
|
||||||
(e: 'update:modelValue', data: Record<string, any>[]): void;
|
(e: 'update:modelValue', data: Record<string, any>[]): void;
|
||||||
|
|
@ -51,7 +65,7 @@ const _props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Array as PropType<Record<string, any>[]>,
|
type: Array as PropType<Record<string, any>[]>,
|
||||||
default: '',
|
default: '',
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
|
@ -71,13 +85,30 @@ const columns = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const dataSource = computed({
|
const modelRef = reactive<{
|
||||||
get: () => {
|
dataSource: any[];
|
||||||
return _props.modelValue || []
|
}>({
|
||||||
},
|
dataSource: [],
|
||||||
set: (val: any) => {
|
});
|
||||||
_emit('update:modelValue', val);
|
|
||||||
}
|
const formRef = ref<any>(null);
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
modelRef.dataSource = _props?.modelValue || []
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
const onSave = () =>
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
formRef.value?.validate().then((_data: any) => {
|
||||||
|
_emit('update:modelValue', _data)
|
||||||
|
resolve(_data);
|
||||||
|
}).catch(() => {
|
||||||
|
reject(false)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
defineExpose({ onSave });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
</style>
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
modelRef.type === 'INVOKE_FUNCTION' && modelRef.function && modelRef.inputs.length
|
modelRef.type === 'INVOKE_FUNCTION' && modelRef.function && modelRef.inputs.length
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<j-form-item
|
<!-- <j-form-item
|
||||||
name="inputs"
|
name="inputs"
|
||||||
label="参数列表"
|
label="参数列表"
|
||||||
:rules="{
|
:rules="{
|
||||||
|
|
@ -113,7 +113,9 @@
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<EditTable v-model="modelRef.inputs" />
|
<EditTable v-model="modelRef.inputs" />
|
||||||
</j-form-item>
|
</j-form-item> -->
|
||||||
|
<div>参数列表</div>
|
||||||
|
<EditTable v-model="modelRef.inputs" ref="inputsRef" />
|
||||||
</j-col>
|
</j-col>
|
||||||
</j-row>
|
</j-row>
|
||||||
</j-form>
|
</j-form>
|
||||||
|
|
@ -142,6 +144,8 @@ type Emits = {
|
||||||
};
|
};
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
|
|
||||||
|
const inputsRef = ref<any>(null);
|
||||||
|
|
||||||
const modelRef = reactive({
|
const modelRef = reactive({
|
||||||
type: undefined,
|
type: undefined,
|
||||||
properties: undefined,
|
properties: undefined,
|
||||||
|
|
@ -165,18 +169,23 @@ const funcChange = (val: string) => {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
value: undefined,
|
value: undefined,
|
||||||
valueType: item?.valueType?.type,
|
valueType: item?.valueType?.type,
|
||||||
|
required: item?.expands?.required
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
modelRef.inputs = list;
|
modelRef.inputs = list;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveBtn = () => {
|
const saveBtn = async () => {
|
||||||
|
const _inputs = await inputsRef.value.onSave();
|
||||||
|
if(!_inputs){
|
||||||
|
return
|
||||||
|
}
|
||||||
formRef.value.validate().then(async () => {
|
formRef.value.validate().then(async () => {
|
||||||
const values = toRaw(modelRef);
|
const values = toRaw(modelRef);
|
||||||
let _inputs: any[] = [];
|
let _inputs: any[] = [];
|
||||||
if (modelRef.inputs.length) {
|
if (modelRef.inputs.length) {
|
||||||
_inputs = modelRef.inputs.filter((i: any) => !i.value);
|
_inputs = modelRef.inputs.filter((i: any) => !i.value && i?.required);
|
||||||
if (_inputs.length) {
|
if (_inputs.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
<div style="position: absolute; right: 0; top: 5px; z-index: 999">
|
<div style="position: absolute; right: 0; top: 5px; z-index: 999">
|
||||||
<j-space>
|
<j-space>
|
||||||
<j-button type="primary" @click="onStart">开始动画</j-button>
|
<j-button type="primary" @click="onStart">开始动画</j-button>
|
||||||
<j-button type="primary" @click="onStop">停止动画</j-button>
|
<j-button type="primary" v-if="!stop" @click="onStop">暂停动画</j-button>
|
||||||
|
<j-button type="primary" v-else @click="onResume">继续动画</j-button>
|
||||||
</j-space>
|
</j-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -32,16 +33,24 @@ const prop = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const stop = ref<boolean>(false);
|
||||||
const geoList = ref<any[]>([]);
|
const geoList = ref<any[]>([]);
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const amapPath = ref()
|
const amapPath = ref()
|
||||||
|
|
||||||
const onStart = () => {
|
const onStart = () => {
|
||||||
amapPath.value.start()
|
amapPath.value?.start()
|
||||||
|
stop.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const onStop = () => {
|
const onStop = () => {
|
||||||
amapPath.value.stop()
|
amapPath.value?.pause()
|
||||||
|
stop.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const onResume = () => {
|
||||||
|
amapPath.value?.resume()
|
||||||
|
stop.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const query = async () => {
|
const query = async () => {
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
/>
|
/>
|
||||||
钉钉
|
钉钉
|
||||||
</span>
|
</span>
|
||||||
向<span class="notify-text-highlight">{{
|
{{(options?.sendTo || options?.orgName) ? '向' : ""}}<span class="notify-text-highlight">{{
|
||||||
options?.sendTo || ''
|
options?.sendTo || ''
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="notify-text-highlight">{{
|
<span class="notify-text-highlight">{{
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
/>
|
/>
|
||||||
微信
|
微信
|
||||||
</span>
|
</span>
|
||||||
向<span class="notify-text-highlight">{{
|
{{(options?.sendTo || options?.orgName || options?.tagName) ? '向' : ''}}<span class="notify-text-highlight">{{
|
||||||
options?.sendTo || ''
|
options?.sendTo || ''
|
||||||
}}</span>
|
}}</span>
|
||||||
<span class="notify-text-highlight">{{
|
<span class="notify-text-highlight">{{
|
||||||
|
|
@ -138,7 +138,7 @@
|
||||||
/>
|
/>
|
||||||
邮件
|
邮件
|
||||||
</span>
|
</span>
|
||||||
向<span class="notify-text-highlight">
|
{{options?.sendTo ? '向' : ''}}<span class="notify-text-highlight">
|
||||||
<Ellipsis style='max-width: 400px;'>
|
<Ellipsis style='max-width: 400px;'>
|
||||||
{{
|
{{
|
||||||
options?.sendTo || ''
|
options?.sendTo || ''
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
/>
|
/>
|
||||||
语音
|
语音
|
||||||
</span>
|
</span>
|
||||||
向<span class="notify-text-highlight">{{
|
{{ options?.sendTo ? '向' : ''}}<span class="notify-text-highlight">{{
|
||||||
options?.sendTo || ''
|
options?.sendTo || ''
|
||||||
}}</span>
|
}}</span>
|
||||||
发送
|
发送
|
||||||
|
|
@ -194,7 +194,7 @@
|
||||||
/>
|
/>
|
||||||
短信
|
短信
|
||||||
</span>
|
</span>
|
||||||
向<span class="notify-text-highlight">{{
|
{{options?.sendTo ? '向' : ''}}<span class="notify-text-highlight">{{
|
||||||
options?.sendTo || ''
|
options?.sendTo || ''
|
||||||
}}</span>
|
}}</span>
|
||||||
发送
|
发送
|
||||||
|
|
|
||||||
|
|
@ -129,15 +129,19 @@ const handleSearch = (_params: any) => {
|
||||||
params.value = _params;
|
params.value = _params;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const
|
||||||
|
|
||||||
const handleClick = (dt: any) => {
|
const handleClick = (dt: any) => {
|
||||||
if (_selectedRowKeys.value.includes(dt.id)) {
|
if (_selectedRowKeys.value.includes(dt.id)) {
|
||||||
_selectedRowKeys.value = [];
|
_selectedRowKeys.value = [];
|
||||||
emit('update:value', undefined);
|
emit('update:value', undefined);
|
||||||
emit('change', { templateName: undefined });
|
emit('change', { templateName: undefined, orgName: undefined, sendTo: undefined });
|
||||||
emit('update:detail', undefined);
|
emit('update:detail', undefined);
|
||||||
} else {
|
} else {
|
||||||
|
// console.log(dt)
|
||||||
_selectedRowKeys.value = [dt.id];
|
_selectedRowKeys.value = [dt.id];
|
||||||
emit('update:value', dt.id);
|
emit('update:value', dt.id);
|
||||||
|
// emit('change', { templateName: dt?.name, orgName: dt.template?.departmentIdList, sendTo: dt.template?.userIdList });
|
||||||
emit('change', { templateName: dt?.name });
|
emit('change', { templateName: dt?.name });
|
||||||
emit('update:detail', dt);
|
emit('update:detail', dt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
:value="formModel.variables"
|
:value="formModel.variables"
|
||||||
:notify="formModel"
|
:notify="formModel"
|
||||||
:template="template"
|
:template="template"
|
||||||
:options='options'
|
:options='formModel.options'
|
||||||
@change="(val) => onValChange(val, 'variables')"
|
@change="(val) => onValChange(val, 'variables')"
|
||||||
ref="variableRef"
|
ref="variableRef"
|
||||||
/>
|
/>
|
||||||
|
|
@ -148,13 +148,20 @@ const onValChange = (val: any, type: string) => {
|
||||||
formModel.templateId = '';
|
formModel.templateId = '';
|
||||||
formModel.variables = [];
|
formModel.variables = [];
|
||||||
formModel.notifierId = '';
|
formModel.notifierId = '';
|
||||||
|
formModel.options = {}
|
||||||
} else if (type === 'notifierId') {
|
} else if (type === 'notifierId') {
|
||||||
formModel.templateId = '';
|
formModel.templateId = '';
|
||||||
formModel.variables = [];
|
formModel.variables = [];
|
||||||
|
formModel.options = {
|
||||||
|
...val
|
||||||
|
}
|
||||||
} else if (type === 'templateId') {
|
} else if (type === 'templateId') {
|
||||||
formModel.variables = [];
|
formModel.variables = [];
|
||||||
|
formModel.options = {
|
||||||
|
provider: formModel?.options?.provider || '',
|
||||||
|
...val
|
||||||
|
}
|
||||||
}
|
}
|
||||||
console.log(val)
|
|
||||||
formModel.options = {
|
formModel.options = {
|
||||||
...unref(formModel.options),
|
...unref(formModel.options),
|
||||||
...val,
|
...val,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue