Kaynağa Gözat

参数修改

zuy 2 yıl önce
ebeveyn
işleme
2255acee2f

+ 17 - 17
admin-web/src/components/form/ExtDSelect.vue

@@ -18,13 +18,13 @@
         :key="idx"
         :label="item.name||item.label"
         :value="item.value">
-      <span class="option-item" style="float: left"><i :style="setupColorStyle(state.colorList[item.value%8])">{{  item.name||item.label }}</i></span>
+      <span class="option-item" style="float: left"><i :style="setupColorStyle(state.colorList[item.value%8])">{{ item.name || item.label }}</i></span>
       <!--        :style="setupColorStyle(item.color)"-->
     </el-option>
   </el-select>
 </template>
 <script setup lang="ts" name="ExtDSelect">
-import { onMounted, reactive,watch} from 'vue';
+import {onMounted, reactive, watch} from 'vue';
 import {Session} from "/@/utils/storage";
 import u from "/@/utils/u";
 
@@ -58,28 +58,28 @@ const props = defineProps({
     type: String,
     default: '请选择'
   },
-  size:{
-    type:String,
-    default:'default'
+  size: {
+    type: String,
+    default: 'default'
   }
 })
 
 const state = reactive({
-  dicts:[],
-  dataVal:null as any,
-  colorList:["#FFB800","#009688","#1E9FFF","#00C7D2","#599CDE","#FF5722","#eb2f96","#4a5055"],
-  dictList:{
-    'User.status':[
-      {label:'有效',value:1},
-      {label:'无效',value:0},
+  dicts: [] as Array<any>,
+  dataVal: null as any,
+  colorList: ["#FFB800", "#009688", "#1E9FFF", "#00C7D2", "#599CDE", "#FF5722", "#eb2f96", "#4a5055"],
+  dictList: {
+    'User.status': [
+      {label: '有效', value: 1},
+      {label: '无效', value: 0},
     ]
   }
 })
 
-const emit = defineEmits(['update:modelValue','on-change']);
+const emit = defineEmits(['update:modelValue', 'on-change']);
 
-watch(()=>props.modelValue,(val,oldVal)=>{
-  console.log('ExtDSelect',val,oldVal)
+watch(() => props.modelValue, (val, oldVal) => {
+  console.log('ExtDSelect', val, oldVal)
   state.dataVal = props.modelValue;
 })
 
@@ -110,8 +110,8 @@ onMounted(() => {
     const dicts = Session.get("dicts");
     if (!u.isEmptyOrNull(dicts)) {
       state.dicts = dicts[props.type];
-    }else{
-      state.dicts =state. dictList[props.type]
+    } else {
+      state.dicts = state.dictList[props.type]
       console.table(state.dicts)
     }
 

+ 1 - 1
admin-web/src/views/admin/station/list/index.vue

@@ -197,7 +197,7 @@ onBeforeUnmount(() => {
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageNumber = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $get(`/station/listStation`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {