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