解决控制台警告信息

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

@ -32,10 +32,28 @@
<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>
@ -47,11 +65,10 @@
</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[];
}>({ }>({
@ -63,32 +80,32 @@ 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>

View File

@ -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();

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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([
"超市", "超市",
"生鲜", "生鲜",

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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([
"超市", "超市",
"生鲜", "生鲜",

View File

@ -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({

View File

@ -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([
"超市", "超市",
"生鲜", "生鲜",

View File

@ -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([
"超市", "超市",
"生鲜", "生鲜",