解决控制台警告信息

This commit is contained in:
weipengfei 2023-09-20 10:22:15 +08:00
parent ae99330228
commit 859c560351
16 changed files with 94 additions and 105 deletions

View File

@ -1,17 +1,17 @@
<template>
<div>
<el-card class="!border-none" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="管理员名称" prop="name">
<el-input
class="w-[280px]"
v-model="queryParams.name"
clearable
placeholder="请输入管理员名称"
/>
</el-form-item>
<el-form-item label="请选择管理员角色" prop="role_id">
<el-select class="w-[280px]" v-model="queryParams.role_id">
<div>
<el-card class="!border-none" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="管理员名称" prop="name">
<el-input
class="w-[280px]"
v-model="queryParams.name"
clearable
placeholder="请输入管理员名称"
/>
</el-form-item>
<el-form-item label="请选择管理员角色" prop="role_id">
<el-select class="w-[280px]" v-model="queryParams.role_id">
<el-option label="全部" value />
<el-option
v-for="(item, index) in optionsData.role"
@ -20,38 +20,55 @@
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
<el-table-column label="账号" prop="account" min-width="120" />
<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 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="角色"
prop="role_name"
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>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
</div>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
</div>
</template>
<script lang="ts" setup name="companyLists">
import { usePaging } from '@/hooks/usePaging'
import { usePaging } from "@/hooks/usePaging";
import { roleAll } from "@/api/perms/role";
import { useDictData,useDictOptions } from '@/hooks/useDictOptions'
import { adminLists} from "@/api/perms/admin";
import { defineEmits, defineProps } from 'vue'
import { useDictData, useDictOptions } from "@/hooks/useDictOptions";
import { adminLists } from "@/api/perms/admin";
const { optionsData } = useDictOptions<{
role: any[];
}>({
@ -61,34 +78,34 @@ const { optionsData } = useDictOptions<{
});
//
const queryParams = reactive({
name: "",
role_id: "",
})
name: "",
role_id: "",
});
const props = defineProps({
type: {
type: Number,
defualt: 0
}
})
type: {
type: Number,
defualt: 0,
},
});
if(props.type==8){
queryParams.role_id = 8
if (props.type == 8) {
queryParams.role_id = 8;
}
//
const emits = defineEmits(['customEvent'])
const emits = defineEmits(["customEvent"]);
//
const handleCurrentChange = (value: any) => {
emits('customEvent', value)
}
emits("customEvent", value);
};
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: adminLists,
params: queryParams
})
fetchFun: adminLists,
params: queryParams,
});
getLists()
getLists();
</script>

View File

@ -100,7 +100,7 @@ const queryParams = reactive({
start_time: "",
end_time: "",
page_no: 1,
pageSize: 150,
page_size: 300,
});
if (route.query.id) {
queryParams.scheduling_id = route.query.id.toString();

View File

@ -89,8 +89,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -89,8 +89,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -93,8 +93,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -97,8 +97,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -101,8 +101,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -217,8 +217,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -124,17 +124,17 @@
<el-col :span="8">
<el-form-item label="经营类型" prop="manage_type">
<el-select
v-model="datas.manage_type"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in storeTypeList"
:key="index"
:label="item"
:value="index + ''"
></el-option>
</el-select>
v-model="datas.manage_type"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in storeTypeList"
:key="index"
:label="item"
:value="index + ''"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
@ -242,8 +242,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const storeTypeList = ref([
"超市",
"生鲜",

View File

@ -72,8 +72,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -40,8 +40,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -106,8 +106,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const props = defineProps({
datas: {
type: Object,

View File

@ -113,8 +113,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const storeTypeList = ref([
"超市",
"生鲜",

View File

@ -256,8 +256,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const landPlanList = ref(["自己种", "出租", "代种", "租更多地扩大种植"]);
const props = defineProps({

View File

@ -164,8 +164,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const storeTypeList = ref([
"超市",
"生鲜",

View File

@ -124,17 +124,17 @@
<el-col :span="8">
<el-form-item label="经营类型" prop="manage_type">
<el-select
v-model="datas.manage_type"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in storeTypeList"
:key="index"
:label="item"
:value="index + ''"
></el-option>
</el-select>
v-model="datas.manage_type"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in storeTypeList"
:key="index"
:label="item"
:value="index + ''"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
@ -242,8 +242,6 @@
</template>
<script setup lang='ts'>
import { ref, defineProps } from "vue";
const storeTypeList = ref([
"超市",
"生鲜",