Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1d84c517d5
|
@ -123,7 +123,7 @@
|
|||
placeholder="请选择功能"
|
||||
v-model:value="modelRef.message.functionId"
|
||||
show-search
|
||||
@change="funcChange"
|
||||
@change="(e) => funcChange(e)"
|
||||
>
|
||||
<j-select-option
|
||||
v-for="i in metadata?.functions || []"
|
||||
|
@ -216,12 +216,33 @@ const onPropertyChange = (val: string, flag?: boolean) => {
|
|||
};
|
||||
|
||||
const onTypeChange = () => {
|
||||
modelRef.message = {
|
||||
properties: undefined,
|
||||
functionId: undefined,
|
||||
inputs: [],
|
||||
value: undefined,
|
||||
};
|
||||
// 需要记住之前的选择, 所以注释了该代码
|
||||
// modelRef.message = {
|
||||
// properties: undefined,
|
||||
// functionId: undefined,
|
||||
// inputs: [],
|
||||
// value: undefined,
|
||||
// };
|
||||
};
|
||||
|
||||
const funcChange = (val: string, _inputs?: any[]) => {
|
||||
if (val) {
|
||||
const arr =
|
||||
props.metadata?.functions.find((item: any) => item.id === val)
|
||||
?.inputs || [];
|
||||
const list = arr.map((item: any) => {
|
||||
const _item = _inputs?.find(i => i.id === item.id)
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
value: undefined,
|
||||
valueType: item?.valueType?.type,
|
||||
..._item,
|
||||
required: item?.expands?.required
|
||||
};
|
||||
});
|
||||
modelRef.message.inputs = list;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
|
@ -232,6 +253,9 @@ watch(
|
|||
if (newVal?.message?.properties) {
|
||||
onPropertyChange(newVal?.message?.properties, true);
|
||||
}
|
||||
if (newVal?.message?.functionId) {
|
||||
funcChange(newVal?.message?.functionId, newVal?.message?.inputs);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -239,24 +263,6 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
const funcChange = (val: string) => {
|
||||
if (val) {
|
||||
const arr =
|
||||
props.metadata?.functions.find((item: any) => item.id === val)
|
||||
?.inputs || [];
|
||||
const list = arr.map((item: any) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
value: undefined,
|
||||
valueType: item?.valueType?.type,
|
||||
required: item?.expands?.required
|
||||
};
|
||||
});
|
||||
modelRef.message.inputs = list;
|
||||
}
|
||||
};
|
||||
|
||||
const saveBtn = () =>
|
||||
new Promise((resolve) => {
|
||||
formRef.value
|
||||
|
|
|
@ -72,7 +72,7 @@ const queryChartsAggList = async () => {
|
|||
{
|
||||
property: prop.data.id,
|
||||
alias: prop.data.id,
|
||||
agg: agg.value,
|
||||
agg: _type.value ? agg.value : 'COUNT',
|
||||
},
|
||||
],
|
||||
query: {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
:columns="columns"
|
||||
:request="CascadeApi.queryChannelList"
|
||||
:defaultParams="{
|
||||
sorts: [{ name: 'name', order: 'desc' }],
|
||||
sorts: [{ name: 'deviceName', order: 'asc' }, { name: 'name', order: 'asc' }],
|
||||
terms: [
|
||||
{
|
||||
column: 'id',
|
||||
|
@ -142,6 +142,7 @@ const columns = [
|
|||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
scopedSlots: true,
|
||||
width: 150,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: [
|
||||
|
|
|
@ -212,6 +212,7 @@ const columns = [
|
|||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
scopedSlots: true,
|
||||
width: 150,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: [
|
||||
|
@ -226,6 +227,7 @@ const columns = [
|
|||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 100,
|
||||
scopedSlots: true,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -428,6 +428,10 @@
|
|||
required: true,
|
||||
message: '请输入心跳周期',
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: '请输入1~10000的整数',
|
||||
}
|
||||
]"
|
||||
>
|
||||
<j-input-number
|
||||
|
@ -450,6 +454,10 @@
|
|||
required: true,
|
||||
message: '请输入注册间隔',
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: '请输入1~10000的整数',
|
||||
}
|
||||
]"
|
||||
>
|
||||
<j-input-number
|
||||
|
|
|
@ -65,7 +65,7 @@ const createChart = () => {
|
|||
left: maxY > 100000 ? 90 : 50,
|
||||
right: '5%',
|
||||
top: '5%',
|
||||
bottom: '5%',
|
||||
bottom: '10%',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
|
@ -199,7 +199,7 @@ watch(
|
|||
.chart,
|
||||
.no-data {
|
||||
width: 100%;
|
||||
min-height: calc(100vh - 430px);
|
||||
min-height: calc(100vh - 450px);
|
||||
}
|
||||
.no-data {
|
||||
display: flex;
|
||||
|
|
|
@ -35,11 +35,13 @@
|
|||
/>
|
||||
</j-col>
|
||||
<j-col :span="24" class="dash-board-bottom">
|
||||
<Card
|
||||
title="播放数量(人次)"
|
||||
:chartData="chartData"
|
||||
@change="getPlayCount"
|
||||
/>
|
||||
<full-page>
|
||||
<Card
|
||||
title="播放数量(人次)"
|
||||
:chartData="chartData"
|
||||
@change="getPlayCount"
|
||||
/>
|
||||
</full-page>
|
||||
</j-col>
|
||||
</j-row>
|
||||
</page-container>
|
||||
|
|
|
@ -302,8 +302,8 @@ const handleSubmit = () => {
|
|||
};
|
||||
}
|
||||
const res = formData.value.id
|
||||
? await ChannelApi.update(formData.value.id, extraFormData)
|
||||
: await ChannelApi.save(extraFormData);
|
||||
? await ChannelApi.update(formData.value.id, extraFormData).finally(() => {loading.value = false;})
|
||||
: await ChannelApi.save(extraFormData).finally(() => {loading.value = false;});
|
||||
if (res.success) {
|
||||
onlyMessage('操作成功');
|
||||
_vis.value = false;
|
||||
|
|
|
@ -191,6 +191,7 @@ const columns = [
|
|||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
scopedSlots: true,
|
||||
width: 150,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: [
|
||||
|
|
Loading…
Reference in New Issue