解决控制台警告信息
This commit is contained in:
parent
ae99330228
commit
859c560351
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none" shadow="never">
|
<el-card class="!border-none" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
<el-form-item label="管理员名称" prop="name">
|
<el-form-item label="管理员名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
class="w-[280px]"
|
class="w-[280px]"
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入管理员名称"
|
placeholder="请输入管理员名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="请选择管理员角色" prop="role_id">
|
<el-form-item label="请选择管理员角色" prop="role_id">
|
||||||
<el-select class="w-[280px]" v-model="queryParams.role_id">
|
<el-select class="w-[280px]" v-model="queryParams.role_id">
|
||||||
<el-option label="全部" value />
|
<el-option label="全部" value />
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in optionsData.role"
|
v-for="(item, index) in optionsData.role"
|
||||||
@ -20,38 +20,55 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||||
<el-table-column label="账号" prop="account" min-width="120" />
|
<el-table-column label="账号" prop="account" min-width="120" />
|
||||||
<el-table-column label="名称" prop="name" min-width="100" />
|
<el-table-column label="名称" prop="name" min-width="100" />
|
||||||
<el-table-column label="角色" prop="role_name" min-width="100" show-tooltip-when-overflow />
|
<el-table-column
|
||||||
<el-table-column label="部门" prop="dept_name" min-width="100" show-tooltip-when-overflow />
|
label="角色"
|
||||||
<el-table-column label="创建时间" prop="create_time" min-width="180" />
|
prop="role_name"
|
||||||
<el-table-column label="最近登录时间" prop="login_time" min-width="180" />
|
min-width="100"
|
||||||
|
show-tooltip-when-overflow
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="部门"
|
||||||
|
prop="dept_name"
|
||||||
|
min-width="100"
|
||||||
|
show-tooltip-when-overflow
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
min-width="180"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="最近登录时间"
|
||||||
|
prop="login_time"
|
||||||
|
min-width="180"
|
||||||
|
/>
|
||||||
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" />
|
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mt-4 justify-end">
|
<div class="flex mt-4 justify-end">
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="companyLists">
|
<script lang="ts" setup name="companyLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
import { roleAll } from "@/api/perms/role";
|
import { roleAll } from "@/api/perms/role";
|
||||||
import { useDictData,useDictOptions } from '@/hooks/useDictOptions'
|
import { useDictData, useDictOptions } from "@/hooks/useDictOptions";
|
||||||
import { adminLists} from "@/api/perms/admin";
|
import { adminLists } from "@/api/perms/admin";
|
||||||
import { defineEmits, defineProps } from 'vue'
|
|
||||||
const { optionsData } = useDictOptions<{
|
const { optionsData } = useDictOptions<{
|
||||||
role: any[];
|
role: any[];
|
||||||
}>({
|
}>({
|
||||||
@ -61,34 +78,34 @@ const { optionsData } = useDictOptions<{
|
|||||||
});
|
});
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
name: "",
|
name: "",
|
||||||
role_id: "",
|
role_id: "",
|
||||||
})
|
});
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
defualt: 0
|
defualt: 0,
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
if(props.type==8){
|
if (props.type == 8) {
|
||||||
queryParams.role_id = 8
|
queryParams.role_id = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
const emits = defineEmits(['customEvent'])
|
const emits = defineEmits(["customEvent"]);
|
||||||
|
|
||||||
// 选中数据子父传递
|
// 选中数据子父传递
|
||||||
const handleCurrentChange = (value: any) => {
|
const handleCurrentChange = (value: any) => {
|
||||||
emits('customEvent', value)
|
emits("customEvent", value);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
fetchFun: adminLists,
|
fetchFun: adminLists,
|
||||||
params: queryParams
|
params: queryParams,
|
||||||
})
|
});
|
||||||
|
|
||||||
getLists()
|
getLists();
|
||||||
</script>
|
</script>
|
||||||
|
@ -100,7 +100,7 @@ const queryParams = reactive({
|
|||||||
start_time: "",
|
start_time: "",
|
||||||
end_time: "",
|
end_time: "",
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
pageSize: 150,
|
page_size: 300,
|
||||||
});
|
});
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
queryParams.scheduling_id = route.query.id.toString();
|
queryParams.scheduling_id = route.query.id.toString();
|
||||||
|
@ -89,8 +89,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -89,8 +89,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -93,8 +93,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -97,8 +97,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -101,8 +101,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -217,8 +217,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -124,17 +124,17 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="经营类型" prop="manage_type">
|
<el-form-item label="经营类型" prop="manage_type">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="datas.manage_type"
|
v-model="datas.manage_type"
|
||||||
clearable
|
clearable
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in storeTypeList"
|
v-for="(item, index) in storeTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="index + ''"
|
:value="index + ''"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -242,8 +242,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const storeTypeList = ref([
|
const storeTypeList = ref([
|
||||||
"超市",
|
"超市",
|
||||||
"生鲜",
|
"生鲜",
|
||||||
|
@ -72,8 +72,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -40,8 +40,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -106,8 +106,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
datas: {
|
datas: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -113,8 +113,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const storeTypeList = ref([
|
const storeTypeList = ref([
|
||||||
"超市",
|
"超市",
|
||||||
"生鲜",
|
"生鲜",
|
||||||
|
@ -256,8 +256,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const landPlanList = ref(["自己种", "出租", "代种", "租更多地扩大种植"]);
|
const landPlanList = ref(["自己种", "出租", "代种", "租更多地扩大种植"]);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -164,8 +164,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const storeTypeList = ref([
|
const storeTypeList = ref([
|
||||||
"超市",
|
"超市",
|
||||||
"生鲜",
|
"生鲜",
|
||||||
|
@ -124,17 +124,17 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="经营类型" prop="manage_type">
|
<el-form-item label="经营类型" prop="manage_type">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="datas.manage_type"
|
v-model="datas.manage_type"
|
||||||
clearable
|
clearable
|
||||||
:style="{ width: '100%' }"
|
:style="{ width: '100%' }"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in storeTypeList"
|
v-for="(item, index) in storeTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="index + ''"
|
:value="index + ''"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -242,8 +242,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { ref, defineProps } from "vue";
|
|
||||||
|
|
||||||
const storeTypeList = ref([
|
const storeTypeList = ref([
|
||||||
"超市",
|
"超市",
|
||||||
"生鲜",
|
"生鲜",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user