Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
137018753c
|
@ -93,7 +93,13 @@ const formModel = ref<formState>({
|
|||
description: '',
|
||||
});
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
{
|
||||
max: 64,
|
||||
message: '最多可输入64个字符',
|
||||
},
|
||||
],
|
||||
sortIndex: [{ required: true, message: '请输入排序', trigger: 'blur' }],
|
||||
});
|
||||
const visible = ref(false);
|
||||
|
@ -112,7 +118,7 @@ const submitData = async () => {
|
|||
addParams.value = {
|
||||
...formModel.value,
|
||||
// sortIndex:
|
||||
// childArr.value[childArr.value.length - 1].sortIndex + 1,
|
||||
// childArr.value[childArr.value.length - 1].sortIndex + 1,
|
||||
parentId: addObj.value.id,
|
||||
};
|
||||
} else if (props.isChild === 2) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
ref="tableRef"
|
||||
:columns="table.columns"
|
||||
:dataSource="dataSource"
|
||||
model="table"
|
||||
model="TABLE"
|
||||
:defaultParams="{
|
||||
paging: false,
|
||||
sorts: [
|
||||
|
@ -35,7 +35,7 @@
|
|||
</PermissionButton>
|
||||
</template>
|
||||
<template #action="slotProps">
|
||||
<j-space :size="16">
|
||||
<j-space>
|
||||
<template
|
||||
v-for="i in getActions(slotProps, 'table')"
|
||||
:key="i.key"
|
||||
|
@ -222,23 +222,31 @@ const getActions = (
|
|||
|
||||
const table = reactive({
|
||||
columns: [
|
||||
{ title: '名称', dataIndex: 'name', key: 'name' },
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
ellipsis: true,
|
||||
width:600
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'sortIndex',
|
||||
key: 'sortIndex',
|
||||
scopedSlots: true,
|
||||
width:200
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
width:700
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
fixed: 'right',
|
||||
width: 250,
|
||||
ellipsis: true,
|
||||
scopedSlots: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -269,7 +269,8 @@
|
|||
<!-- 选择设备 -->
|
||||
<j-modal
|
||||
title="设备接入配置"
|
||||
:visible="visible"
|
||||
v-if="visible"
|
||||
visible
|
||||
width="1200px"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
|
@ -280,6 +281,7 @@
|
|||
:columns="query.columns"
|
||||
target="deviceModal"
|
||||
@search="search"
|
||||
type='simple'
|
||||
/>
|
||||
<JProTable
|
||||
:columns="query.columns"
|
||||
|
@ -442,6 +444,7 @@ const showModal = () => {
|
|||
* 关闭弹窗
|
||||
*/
|
||||
const cancel = () => {
|
||||
queryParams.value = {};
|
||||
visible.value = false;
|
||||
};
|
||||
/**
|
||||
|
@ -968,6 +971,7 @@ const submitData = async () => {
|
|||
message.success('操作成功!');
|
||||
}
|
||||
visible.value = false;
|
||||
queryParams.value = {};
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
placeholder="请选择产品分类"
|
||||
:tree-data="treeList"
|
||||
@change="valueChange"
|
||||
allow-clear
|
||||
:fieldNames="{ label: 'name', value: 'id' }"
|
||||
:filterTreeNode="
|
||||
(v, option) => filterSelectNode(v, option)
|
||||
|
|
|
@ -202,7 +202,7 @@ const columns = [
|
|||
scopedSlots: true,
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
title: '产品名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="card-wrapper">
|
||||
<div class="card-header">
|
||||
<div class="title">{{ title }}</div>
|
||||
<div class="tools">
|
||||
|
@ -156,7 +156,7 @@ watch(
|
|||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.wrapper {
|
||||
.card-wrapper {
|
||||
padding: 24px;
|
||||
background-color: #fff;
|
||||
.card-header {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
sorts: [{ name: 'createTime', order: 'desc' }],
|
||||
}"
|
||||
:params="params"
|
||||
:gridColumn="3"
|
||||
:gridColumn="2"
|
||||
>
|
||||
<template #headerTitle>
|
||||
<PermissionButton
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<!-- 选择设备 -->
|
||||
<j-modal
|
||||
title="选择设备"
|
||||
width="800px"
|
||||
width="850px"
|
||||
v-model:visible="visible"
|
||||
:maskClosable="false"
|
||||
:destroyOnClose="true"
|
||||
|
@ -57,6 +57,7 @@
|
|||
deviceItem = record;
|
||||
}
|
||||
}"
|
||||
:alertRender="false"
|
||||
:pagination="{
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ['10', '20', '50', '100'],
|
||||
|
@ -160,6 +161,7 @@ const columns = [
|
|||
key: 'id',
|
||||
search: {
|
||||
type: 'string',
|
||||
defaultTermType: 'eq',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -316,15 +316,10 @@ const getBindUsers = async () => {
|
|||
* 获取所有用户未绑定的用户
|
||||
*/
|
||||
const allUserList = ref([]);
|
||||
const getAllUsers = async () => {
|
||||
const getAllUsers = async (terms?: any) => {
|
||||
const params = {
|
||||
paging: false,
|
||||
terms: [
|
||||
{
|
||||
column: `id$user-third$${props.data.type}_${props.data.provider}$not`,
|
||||
value: props.data.id,
|
||||
},
|
||||
],
|
||||
terms,
|
||||
};
|
||||
const { result } = await configApi.getPlatformUsers(params);
|
||||
allUserList.value = result.map((m: any) => ({
|
||||
|
@ -355,11 +350,11 @@ const getTableData = () => {
|
|||
const bindUser = bindUsers.find(
|
||||
(f: any) => f.thirdPartyUserId === deptUser.id,
|
||||
);
|
||||
// if (bindUser) {
|
||||
// unBindUser = unBindUsers.find(
|
||||
// (f: any) => f.id === bindUser.userId,
|
||||
// );
|
||||
// }
|
||||
if (bindUser) {
|
||||
unBindUser = unBindUsers.find(
|
||||
(f: any) => f.id === bindUser.userId,
|
||||
);
|
||||
}
|
||||
dataSource.value.push({
|
||||
thirdPartyUserId: deptUser.id,
|
||||
thirdPartyUserName: deptUser.name,
|
||||
|
@ -422,7 +417,12 @@ const handleBind = (row: any) => {
|
|||
bindVis.value = true;
|
||||
// formData.value = row;
|
||||
Object.assign(formData.value, row);
|
||||
getAllUsers();
|
||||
getAllUsers([
|
||||
{
|
||||
column: `id$user-third$${props.data.type}_${props.data.provider}$not`,
|
||||
// value: props.data.id,
|
||||
},
|
||||
]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue