fix: bug#15420、16072、16195、16208、16218、16220、16222
This commit is contained in:
parent
80651c4df8
commit
5f680d23b9
|
@ -130,7 +130,7 @@
|
|||
<j-select
|
||||
placeholder="请选择"
|
||||
v-if="item.type.type === 'enum'"
|
||||
v-model:value="formData.data[item.name]"
|
||||
v-model:value="formData.data[item.property]"
|
||||
>
|
||||
<j-select-option
|
||||
v-for="el in item?.type?.type === 'enum' &&
|
||||
|
@ -346,6 +346,10 @@ const form = reactive<Record<string, any>>({
|
|||
const formData = reactive<Record<string, any>>({
|
||||
data: productStore.current?.configuration || {},
|
||||
});
|
||||
const fun = () =>{
|
||||
console.log(formData.data,productStore.current?.configuration)
|
||||
}
|
||||
fun()
|
||||
// 产品类型
|
||||
const productTypes = ref([])
|
||||
const productData = reactive({
|
||||
|
@ -662,10 +666,10 @@ const getData = async (accessId?: string) => {
|
|||
item.name === '流传输模式' &&
|
||||
(!productStore.current?.configuration ||
|
||||
!productStore.current?.configuration.hasOwnProperty(
|
||||
item.name,
|
||||
item.property,
|
||||
))
|
||||
) {
|
||||
formData.data[item.name] =
|
||||
formData.data[item.property] =
|
||||
item.type.expands?.defaultValue;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -307,6 +307,7 @@ const handleSubmit = () => {
|
|||
if (res.success) {
|
||||
onlyMessage('操作成功');
|
||||
_vis.value = false;
|
||||
loading.value = false;
|
||||
emit('submit');
|
||||
} else {
|
||||
loading.value = false;
|
||||
|
|
|
@ -396,9 +396,11 @@ const handleSubmit = () => {
|
|||
: { id, streamMode, manufacturer, model, firmware, ...extraParams };
|
||||
} else {
|
||||
// 国标
|
||||
params = !id
|
||||
? { others, id, ...extraParams }
|
||||
: {
|
||||
const getParmas = () =>{
|
||||
if(others?.stream_mode){
|
||||
others.stream_mode = streamMode
|
||||
}
|
||||
return{
|
||||
others,
|
||||
id,
|
||||
streamMode,
|
||||
|
@ -408,6 +410,10 @@ const handleSubmit = () => {
|
|||
...extraParams,
|
||||
};
|
||||
}
|
||||
params = !id
|
||||
? { others, id, ...extraParams }
|
||||
: getParmas()
|
||||
}
|
||||
|
||||
formRef.value
|
||||
?.validate()
|
||||
|
|
|
@ -54,7 +54,9 @@
|
|||
<div class="card-item-content-text">
|
||||
厂商
|
||||
</div>
|
||||
<Ellipsis style="width: calc(100% - 20px);">
|
||||
<div>{{ slotProps.manufacturer }}</div>
|
||||
</Ellipsis>
|
||||
</j-col>
|
||||
<j-col :span="12">
|
||||
<div class="card-item-content-text">
|
||||
|
@ -66,7 +68,7 @@
|
|||
<div class="card-item-content-text">
|
||||
型号
|
||||
</div>
|
||||
<Ellipsis>{{ slotProps.model }}</Ellipsis>
|
||||
<Ellipsis style="width: calc(100% - 20px);">{{ slotProps.model }}</Ellipsis>
|
||||
</j-col>
|
||||
<j-col :span="12">
|
||||
<div class="card-item-content-text">
|
||||
|
@ -186,6 +188,7 @@ const columns = [
|
|||
search: {
|
||||
type: 'string',
|
||||
},
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
|
@ -195,12 +198,14 @@ const columns = [
|
|||
type: 'string',
|
||||
first: true,
|
||||
},
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '接入方式',
|
||||
dataIndex: 'provider',
|
||||
key: 'provider',
|
||||
scopedSlots: true,
|
||||
width:120,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: PROVIDER_OPTIONS,
|
||||
|
@ -223,12 +228,14 @@ const columns = [
|
|||
search: {
|
||||
type: 'string',
|
||||
},
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '产品名称',
|
||||
dataIndex: 'productId',
|
||||
key: 'productId',
|
||||
scopedSlots: true,
|
||||
ellipsis: true,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: () =>
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
:params="queryParams"
|
||||
:rowSelection="{
|
||||
selectedRowKeys: table._selectedRowKeys.value,
|
||||
onSelect: selectChange,
|
||||
onSelectNone: ()=> table._selectedRowKeys.value = [],
|
||||
onSelect: table.onSelectChange,
|
||||
onSelectNone: table.cancelSelect,
|
||||
onSelectAll: selectAll
|
||||
}"
|
||||
:columns="columns"
|
||||
|
@ -266,6 +266,7 @@ const table: any = {
|
|||
selectedRowKeys.splice(index, 1);
|
||||
table.selectedRows.splice(index, 1);
|
||||
}
|
||||
table._selectedRowKeys.value = selectedRowKeys
|
||||
},
|
||||
// 取消全选
|
||||
cancelSelect: () => {
|
||||
|
@ -438,17 +439,21 @@ const selectAll = (selected: Boolean, selectedRows: any,changeRows:any) => {
|
|||
changeRows.map((i: any) => {
|
||||
if (!table._selectedRowKeys.value.includes(i.id)) {
|
||||
table._selectedRowKeys.value.push(i.id)
|
||||
table.selectedRows.push(i)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const arr = changeRows.map((item: any) => item.id)
|
||||
const _ids: string[] = [];
|
||||
table._selectedRowKeys.value.map((i: any) => {
|
||||
if (!arr.includes(i)) {
|
||||
_ids.push(i)
|
||||
const _row: any[] = [];
|
||||
table.selectedRows.map((i: any) => {
|
||||
if (!arr.includes(i.id)) {
|
||||
_ids.push(i.id)
|
||||
_row.push(i)
|
||||
}
|
||||
})
|
||||
table._selectedRowKeys.value = _ids
|
||||
table._selectedRowKeys.value = _ids;
|
||||
table.selectedRows = _row;
|
||||
}
|
||||
}
|
||||
const cancel = () => {
|
||||
|
|
|
@ -175,6 +175,7 @@ const form = reactive({
|
|||
|
||||
submit: () => {
|
||||
const api = form.data.id ? updateDepartment_api : addDepartment_api;
|
||||
form.data.parentId = form.data.parentId ? form.data.parentId : '';
|
||||
return api(form.data);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue