This commit is contained in:
2023-11-29 16:37:56 +08:00
parent 49d784d27d
commit 09a63c9f0e
8 changed files with 194 additions and 133 deletions
+80
View File
@@ -0,0 +1,80 @@
<template>
<div>
<vk-data-table-query
v-model="queryForm1.formData"
:columns="queryForm1.columns"
@search="search"
></vk-data-table-query>
<vk-data-table
ref="table1"
:action="table1.action"
:columns="table1.columns"
:query-form-param="queryForm1"
:right-btns="[]"
:selection="true"
:row-no="true"
:pagination="true"
></vk-data-table>
</div>
</template>
<script>
export default {
name: "index",
data() {
return {
queryForm1: {
// 查询表单数据源,可在此设置默认值
formData: {
dcloud_appid: "",
type: 2
//allow_login_background : true,
},
// 查询表单的字段规则 fieldName:指定数据库字段名,不填默认等于key
columns: [
{key: "username", title: "用户名", type: "text", width: 160, mode: "%%"},
{key: "nickname", title: "昵称", type: "text", width: 140, mode: "%%"},
{key: "mobile", title: "手机号", type: "text", width: 140, mode: "%%"},
]
},
table1: {
// 表格数据请求地址
action: "admin/fadada/sys/getList",
// 表格字段显示规则
columns: [
{key: "user.mobile", title: "手机号", type: "text", width: 120, defaultValue: ""},
// {
// key: "", title: "认证类型", type: "text", width: 120, formatter: (val, row, column, index) => {
// return parseInt(row.type) === 1 ? '个人' : '企业'
// }
// },
{
key: "mobile", title: "个人/企业信息", type: "html", defaultValue: "",
formatter: (val, row, column, index) => {
let str
if (parseInt(row.type) === 1) {
str = `<view>${row.person.personName}</view>`
str += `<view>${row.person.mobile}</view>`
} else {
str = `<view>${row.company.companyName}</view>`
str += `<view>${row.manager.personName}/${row.manager.mobile}</view>`
}
return str;
}
},
{key: "authenticationSubmitTime", title: "认证时间", type: "time", width: 160, sortable: "custom"},
],
// 多选框选中的值
multipleSelection: [],
// 当前高亮的记录
selectItem: "",
}
}
},
methods: {
search() {
this.$refs.table1.query();
},
}
}
</script>
+80
View File
@@ -0,0 +1,80 @@
<template>
<div>
<vk-data-table-query
v-model="queryForm1.formData"
:columns="queryForm1.columns"
@search="search"
></vk-data-table-query>
<vk-data-table
ref="table1"
:action="table1.action"
:columns="table1.columns"
:query-form-param="queryForm1"
:right-btns="[]"
:selection="true"
:row-no="true"
:pagination="true"
></vk-data-table>
</div>
</template>
<script>
export default {
name: "index",
data() {
return {
queryForm1: {
// 查询表单数据源,可在此设置默认值
formData: {
dcloud_appid: "",
type: 2
//allow_login_background : true,
},
// 查询表单的字段规则 fieldName:指定数据库字段名,不填默认等于key
columns: [
{key: "username", title: "用户名", type: "text", width: 160, mode: "%%"},
{key: "nickname", title: "昵称", type: "text", width: 140, mode: "%%"},
{key: "mobile", title: "手机号", type: "text", width: 140, mode: "%%"},
]
},
table1: {
// 表格数据请求地址
action: "admin/fadada/sys/getList",
// 表格字段显示规则
columns: [
{key: "user.mobile", title: "手机号", type: "text", width: 120, defaultValue: ""},
{
key: "", title: "认证类型", type: "text", width: 120, formatter: (val, row, column, index) => {
return parseInt(row.type) === 1 ? '个人' : '企业'
}
},
// {
// key: "mobile", title: "个人/企业信息", type: "html", defaultValue: "",
// formatter: (val, row, column, index) => {
// let str
// if (parseInt(row.type) === 1) {
// str = `<view>${row.person.personName}</view>`
// str += `<view>${row.person.mobile}</view>`
// } else {
// str = `<view>${row.company.companyName}</view>`
// str += `<view>${row.manager.personName}/${row.manager.mobile}</view>`
// }
// return str;
// }
// },
{key: "authenticationSubmitTime", title: "认证时间", type: "time", width: 160, sortable: "custom"},
],
// 多选框选中的值
multipleSelection: [],
// 当前高亮的记录
selectItem: "",
}
}
},
methods: {
search() {
this.$refs.table1.query();
},
}
}
</script>
+9 -3
View File
@@ -191,15 +191,21 @@
},
watch: (obj)=> {
console.log(obj);
this.form1.data.name = obj.option.map(item => item.name),join("、")
this.form1.data.name = obj.option.map(item => item.name).join("、")
}
},
{
key: "address",
title: "供货地",
type: "address",
title: "所属用户",
type: "select",
placeholder: "请输入供货地",
},
{
key: "address",
title: "供货地",
type: "address",
placeholder: "请输入供货地",
},
{
key: "files",
title: "附件",