浏览代码

管理后台调试

zuypeng 1 年之前
父节点
当前提交
269e33e475
共有 84 个文件被更改,包括 1153 次插入1472 次删除
  1. 6 6
      admin-web/src/App.vue
  2. 3 3
      admin-web/src/components/avatar/index.vue
  3. 2 2
      admin-web/src/components/form/ExtBoolean.vue
  4. 1 1
      admin-web/src/components/form/ExtDLabel.vue
  5. 6 6
      admin-web/src/components/form/ExtDRadio.vue
  6. 3 3
      admin-web/src/components/form/ExtDSelect.vue
  7. 9 9
      admin-web/src/components/form/ExtDatePicker.vue
  8. 7 7
      admin-web/src/components/form/ExtEditor.vue
  9. 1 1
      admin-web/src/components/form/ExtImage.vue
  10. 2 3
      admin-web/src/components/form/ExtPage.vue
  11. 7 7
      admin-web/src/components/form/ExtQueryForm.vue
  12. 18 0
      admin-web/src/components/form/ExtRender.vue
  13. 8 8
      admin-web/src/components/form/ExtSContainer.vue
  14. 4 4
      admin-web/src/components/form/ExtSearch.vue
  15. 5 5
      admin-web/src/components/form/ExtSelect.vue
  16. 8 3
      admin-web/src/components/form/ExtTable.vue
  17. 15 15
      admin-web/src/components/form/ExtTreeSelect.vue
  18. 2 2
      admin-web/src/components/form/ExtUpload.vue
  19. 1 1
      admin-web/src/components/pdf/index.vue
  20. 1 1
      admin-web/src/directive/authDirective.ts
  21. 1 1
      admin-web/src/layout/logo/index.vue
  22. 2 2
      admin-web/src/layout/navBars/breadcrumb/breadcrumb.vue
  23. 1 1
      admin-web/src/layout/navBars/breadcrumb/index.vue
  24. 10 9
      admin-web/src/layout/navBars/breadcrumb/toolbar.vue
  25. 4 4
      admin-web/src/layout/navBars/tagsView/tagsView.vue
  26. 2 2
      admin-web/src/layout/navMenu/horizontal.vue
  27. 1 1
      admin-web/src/layout/navMenu/vertical.vue
  28. 1 1
      admin-web/src/layout/routerView/parent.vue
  29. 7 7
      admin-web/src/main.ts
  30. 6 6
      admin-web/src/router/frontEnd.ts
  31. 8 8
      admin-web/src/router/index.ts
  32. 5 5
      admin-web/src/stores/keepAliveNames.ts
  33. 1 1
      admin-web/src/stores/routesList.ts
  34. 3 3
      admin-web/src/stores/tagsViewRoutes.ts
  35. 200 200
      admin-web/src/types/views.d.ts
  36. 15 15
      admin-web/src/utils/field.ts
  37. 2 2
      admin-web/src/utils/message.ts
  38. 4 4
      admin-web/src/utils/request.ts
  39. 1 1
      admin-web/src/utils/storage.ts
  40. 33 5
      admin-web/src/utils/u.ts
  41. 3 3
      admin-web/src/views/admin/account/detail.vue
  42. 3 3
      admin-web/src/views/admin/account/index.vue
  43. 2 2
      admin-web/src/views/admin/banner/dialog.vue
  44. 3 3
      admin-web/src/views/admin/banner/index.vue
  45. 0 284
      admin-web/src/views/admin/config/dict/dialog.vue
  46. 0 194
      admin-web/src/views/admin/config/dict/index.vue
  47. 0 127
      admin-web/src/views/admin/config/list/dialog.vue
  48. 0 208
      admin-web/src/views/admin/config/list/index.vue
  49. 7 7
      admin-web/src/views/admin/department/dialog.vue
  50. 1 1
      admin-web/src/views/admin/department/index.vue
  51. 27 21
      admin-web/src/views/admin/dict/index.vue
  52. 10 5
      admin-web/src/views/admin/faq/dialog.vue
  53. 24 12
      admin-web/src/views/admin/faq/index.vue
  54. 2 2
      admin-web/src/views/admin/feedback/dialog.vue
  55. 6 6
      admin-web/src/views/admin/feedback/index.vue
  56. 4 4
      admin-web/src/views/admin/finance/index.vue
  57. 4 4
      admin-web/src/views/admin/index.vue
  58. 3 3
      admin-web/src/views/admin/investor/dialog.vue
  59. 3 3
      admin-web/src/views/admin/investor/index.vue
  60. 4 4
      admin-web/src/views/admin/invoice/dialog.vue
  61. 7 7
      admin-web/src/views/admin/invoice/index.vue
  62. 8 8
      admin-web/src/views/admin/kanban/index.vue
  63. 1 1
      admin-web/src/views/admin/log/error/index.vue
  64. 2 2
      admin-web/src/views/admin/ordering/dialog.vue
  65. 193 84
      admin-web/src/views/admin/ordering/index.vue
  66. 5 5
      admin-web/src/views/admin/refund/index.vue
  67. 4 4
      admin-web/src/views/admin/role/dialog.vue
  68. 9 9
      admin-web/src/views/admin/role/index.vue
  69. 211 0
      admin-web/src/views/admin/station/device/dialog.vue
  70. 45 34
      admin-web/src/views/admin/station/device/index.vue
  71. 12 12
      admin-web/src/views/admin/station/device/upload.vue
  72. 2 2
      admin-web/src/views/admin/station/list/dialog.vue
  73. 7 7
      admin-web/src/views/admin/station/list/index.vue
  74. 10 10
      admin-web/src/views/admin/station/list/upload.vue
  75. 4 4
      admin-web/src/views/admin/station/stat/dialog.vue
  76. 3 3
      admin-web/src/views/admin/station/stat/index.vue
  77. 3 3
      admin-web/src/views/admin/station/statment/index.vue
  78. 7 7
      admin-web/src/views/admin/user/dialog.vue
  79. 3 3
      admin-web/src/views/admin/user/index.vue
  80. 3 4
      admin-web/src/views/login/component/account.vue
  81. 59 0
      car-wash-admin/src/main/java/com/kym/admin/controller/WashOrderController.java
  82. 2 1
      car-wash-entity/src/main/java/com/kym/entity/miniapp/queryParams/WashOrderQueryParams.java
  83. 4 0
      car-wash-service/src/main/java/com/kym/service/miniapp/WashOrderService.java
  84. 27 1
      car-wash-service/src/main/java/com/kym/service/miniapp/impl/WashOrderServiceImpl.java

+ 6 - 6
admin-web/src/App.vue

@@ -73,7 +73,7 @@ onBeforeMount(() => {
 });
 // 页面加载时
 onMounted(() => {
-  console.error("App onMounted")
+  //console.error("App onMounted")
 	nextTick(() => {
 		// 监听布局配'置弹窗点击打开
 		mittBus.on('openSetingsDrawer', () => {
@@ -90,10 +90,10 @@ onMounted(() => {
 		}
 
     window.addEventListener('beforeunload', ()=>{
-      console.log("beforeunload")
+      //console.log("beforeunload")
     });
     window.addEventListener('unload', ()=>{
-      console.log("unload")
+      //console.log("unload")
     });
 
 
@@ -129,17 +129,17 @@ onUnmounted(() => {
 	mittBus.off('openSetingsDrawer', () => {});
 
   window.removeEventListener('beforeunload', ()=>{
-    console.log("removeEventListener beforeunload")
+    //console.log("removeEventListener beforeunload")
   });
   window.removeEventListener('unload', ()=>{
-    console.log("removeEventListener unload")
+    //console.log("removeEventListener unload")
   });
 });
 // 监听路由的变化,设置网站标题
 watch(
 	() => route.path,
 	() => {
-    console.log("route path",route.path)
+    //console.log("route path",route.path)
 
 		other.useTitle();
 	},

+ 3 - 3
admin-web/src/components/avatar/index.vue

@@ -34,7 +34,7 @@ const state = reactive({
 })
 
 watch(() => props.option, (val, oldVal) => {
-  console.log("watch>>>>>>>", props.option)
+  //console.log("watch>>>>>>>", props.option)
   if (val == oldVal) {
     return;
   }
@@ -63,7 +63,7 @@ const getFirst = (name: string) => {
 
 
 const getStyle = (avatar: Avatar) => {
-  console.log(avatar)
+  //console.log(avatar)
   return {
     backgroundColor: colorById(avatar.id || 0),
     color: '#fff'
@@ -95,7 +95,7 @@ const colorById = (i: number) => {
   if (B < 50) B += 60;
   B = parseInt(B).toString(16);
 
-  // console.log(i + ":" + R + ":" + G + ":" + B);
+  // //console.log(i + ":" + R + ":" + G + ":" + B);
   return "#" + R + G + B;
 }
 

+ 2 - 2
admin-web/src/components/form/ExtBoolean.vue

@@ -67,14 +67,14 @@ onMounted(() => {
 })
 
 watch(() => props.modelValue, (val, oldVal) => {
-  console.log('ExtBoolean watch modelValue', val, oldVal)
+  //console.log('ExtBoolean watch modelValue', val, oldVal)
   state.model = props.modelValue;
 })
 
 const emit = defineEmits(['on-change', 'update:modelValue']);
 
 const handleChange = () => {
-  console.log(state.model)
+  //console.log(state.model)
   emit('update:modelValue', state.model)
   emit('on-change', state.model)
 }

+ 1 - 1
admin-web/src/components/form/ExtDLabel.vue

@@ -103,7 +103,7 @@ import u from "/@/utils/u";
 
 const props = defineProps({
   modelValue: {
-    type: [Number, String]
+    type: [Number, String,Boolean]
   },
   type: {
     type: String,

+ 6 - 6
admin-web/src/components/form/ExtDRadio.vue

@@ -32,22 +32,22 @@ const emit = defineEmits(['update:modelValue']);
 const modelVal = computed(() => props.modelValue);
 
 const handleChange = (val: number | Array<number>) => {
-  console.log("handleChange", val)
+  //console.log("handleChange", val)
   emit("update:modelValue", val)
 }
 
 onMounted(() => {
-  console.log(state.dicts)
+  //console.log(state.dicts)
   const dicts = Session.get("dicts");
   if (u.isEmptyOrNull(dicts)) {
     return '--'
   }
-  console.log(dicts)
+  //console.log(dicts)
   let k = props.type;
-  console.log(k)
+  //console.log(k)
   state.dicts = dicts[`${k}`]
-  console.log(dicts)
-  console.log(state.dicts)
+  //console.log(dicts)
+  //console.log(state.dicts)
 });
 
 </script>

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

@@ -84,7 +84,7 @@ const typeOf = (obj: any) => {
 
 
 watch(() => props.modelValue, (val, oldVal) => {
-  console.log('ExtDSelect', val, oldVal,typeOf(val) )
+  //console.log('ExtDSelect', val, oldVal,typeOf(val) )
   nextTick(()=>{
     if (typeOf(val) === "number") {
       state.dataVal = val + "";
@@ -97,7 +97,7 @@ watch(() => props.modelValue, (val, oldVal) => {
 
 
 const handleChange = (val: number | Array<number>) => {
-  console.log("handleChange", val)
+  //console.log("handleChange", val)
   emit("update:modelValue", val)
   emit("on-change", val)
 
@@ -127,7 +127,7 @@ const setupDicts = () => {
     }
   }
   state.dicts = dictList;
-  console.table(dictList)
+  //console.table(dictList)
 }
 
 

+ 9 - 9
admin-web/src/components/form/ExtDatePicker.vue

@@ -82,15 +82,15 @@ const state = reactive({
 })
 
 onMounted(()=>{
-  console.log(props.modelValue)
+  //console.log(props.modelValue)
   nextTick(()=>{
-    console.log(props.modelValue)
+    //console.log(props.modelValue)
   })
   setupDate(props.modelValue)
 })
 
 watch(() => props.modelValue, (val:any, oldVal) => {
-  console.log('props.modelValue', val, oldVal)
+  //console.log('props.modelValue', val, oldVal)
   state.dateValue = val;
  // setupDate(val);
 /*
@@ -109,7 +109,7 @@ watch(() => props.modelValue, (val:any, oldVal) => {
 })
 
 watch(() => state.dateValue, (val, oldVal) => {
-  console.log('props.modelValue', val, oldVal)
+  //console.log('props.modelValue', val, oldVal)
   /*  if (!state.isRangeMode) {
       let changedValue = null;
       if (val) {
@@ -124,7 +124,7 @@ watch(() => state.dateValue, (val, oldVal) => {
 })
 
 const handleChange = (e: Date | Array<Date>) => {
-  console.log('handleChange', e)
+  //console.log('handleChange', e)
   reactiveEmit(e);
   /*if (state.isRangeMode) {
     props.modelValue[`${props.fields}Start`] = e[0] ? new Date(e[0]) : null;
@@ -184,7 +184,7 @@ const setupDate = (val:any)=>{
   }
 
   state.dateValue = fmtDate;
-  console.log(state.dateValue)
+  //console.log(state.dateValue)
 }
 
 /**
@@ -192,7 +192,7 @@ const setupDate = (val:any)=>{
  * @param date
  */
 const reactiveEmit = (date: any) => {
-  console.log(date)
+  //console.log(date)
   let reactiveDate = null;
   if (date) {
     reactiveDate = date;
@@ -250,11 +250,11 @@ const reactiveEmit = (date: any) => {
 
 
 const handleBlur = (e: FocusEvent) => {
-  console.log(e)
+  //console.log(e)
 }
 
 const handleFocus = (e: FocusEvent) => {
-  console.log(e)
+  //console.log(e)
 }
 
 </script>

+ 7 - 7
admin-web/src/components/form/ExtEditor.vue

@@ -95,24 +95,24 @@ editorConfig.MENU_CONF['uploadImage'] = {
   // 上传进度的回调函数
   onProgress(progress: number) {  // TS 语法
     Msg.showLoading('上传中...')
-    console.log('progress', progress)
+    //console.log('progress', progress)
   },
 
   // 单个文件上传成功之后
   onSuccess(file: File, res: any) {  // TS 语法
-    console.log(`${file.name} 上传成功`, res)
+    //console.log(`${file.name} 上传成功`, res)
     Msg.hideLoading();
   },
 
   // 单个文件上传失败
   onFailed(file: File, res: any) {   // TS 语法
     Msg.hideLoading();                    // onFailed(file, res) {           // JS 语法
-    console.log(`${file.name} 上传失败`, res)
+    //console.log(`${file.name} 上传失败`, res)
   },
 
   // 上传错误,或者触发 timeout 超时
   onError(file: File, err: any, res: any) {  // TS 语法
-    console.log(`${file.name} 上传出错`, err, res)
+    //console.log(`${file.name} 上传出错`, err, res)
     Msg.hideLoading();
   },
 }
@@ -129,17 +129,17 @@ const handleCreated = (editor) => {
 }
 
 const handleChange = (editor) => {
-  console.log("handleChange>>>>>>>")
+  //console.log("handleChange>>>>>>>")
   if (init.value) {
     init.value = false;
-    console.log("handleChange>>>>>>> init return.")
+    //console.log("handleChange>>>>>>> init return.")
     return;
   }
   emit('update:modelValue', editor.getHtml())
 }
 
 const handleDestroyed = (editor) => {
-  console.log('destroyed', editor)
+  //console.log('destroyed', editor)
 }
 
 

+ 1 - 1
admin-web/src/components/form/ExtImage.vue

@@ -69,7 +69,7 @@ watch(() => props.srcList, (nv, ov) => {
       state.previewList = [u.fmt.fmtUrl(nv)];
       state.url = state.previewList[0]
     }
-    console.log(state.previewList)
+    //console.log(state.previewList)
   }
 }, {immediate: true, deep: true})
 

+ 2 - 3
admin-web/src/components/form/ExtPage.vue

@@ -42,7 +42,6 @@ const state = reactive({
 watch(
     () => props.value,
     (val, oldVal) => {
-      console.log("page",val)
       nextTick(() => {
         setupPage();
       })
@@ -68,12 +67,12 @@ const handleSizeChange = (val: number) => {
   state.page.pageSize = val;
   emit("update:value", state.page)
   emit("change", state.page)
-  console.log(`${val} items per page`)
+  //console.log(`${val} items per page`)
 }
 const handleCurrentChange = (val: number) => {
   state.page.pageNum = val;
   emit("update:value", state.page)
   emit("change", state.page)
-  console.log(`current page: ${val}`)
+  //console.log(`current page: ${val}`)
 }
 </script>

+ 7 - 7
admin-web/src/components/form/ExtQueryForm.vue

@@ -159,14 +159,14 @@
         </div>
       </el-row>
 
-      <ext-import
+<!--      <ext-import
           @confirm="handleImport"
           ref="import_ref"
           v-if="state.importEnable"
           :importUrl="importConfig.url"
           :templateUrl="importConfig.template"
           v-auths="importConfig.auths">
-      </ext-import>
+      </ext-import>-->
     </el-card>
   </div>
 </template>
@@ -234,19 +234,19 @@ onMounted(() => {
     state.value.exportEnable = true;
   }
 
-  console.log(props.columns)
+  //console.log(props.columns)
   state.value.cols = fieldUtil.toFormQueryField(props.columns);
-  console.log(state.value.cols)
+  //console.log(state.value.cols)
   let val = {...props.modelValue}
   state.value.cols.forEach((col: any) => {
     val[col.prop] = null;
   })
-  console.log(val)
+  //console.log(val)
   state.value.form = val;
 })
 
 const onQueryChange = () => {
-  console.log("onQueryChange>>>", JSON.stringify(state.value.form))
+  //console.log("onQueryChange>>>", JSON.stringify(state.value.form))
   emit("update:modelValue", state.value.form);
   emit("on-change")
 }
@@ -262,7 +262,7 @@ const onResetForm = (formEl: FormInstance | undefined) => {
     }
     state.value.form[key.prop] = null
   })
-  // console.log(state.value.form,props.columns)
+  // //console.log(state.value.form,props.columns)
   emit("update:modelValue", {})
   emit("on-change")
 };

+ 18 - 0
admin-web/src/components/form/ExtRender.vue

@@ -0,0 +1,18 @@
+<script >
+import {h} from "vue";
+
+export default {
+  name: 'ExtRender',
+  props: {
+    data: Object|String,
+    renderFunc:Function
+  },
+  //h(节点名,属性,子组件[]或文本)
+  //通过render创建组件而不是通过template。没有:绑定参数的操作而是直接{}绑定参数
+  render() {
+    return (
+        this.renderFunc(h,this.data)
+    )
+  }
+}
+</script>>

+ 8 - 8
admin-web/src/components/form/ExtSContainer.vue

@@ -118,7 +118,7 @@ const state = reactive({
 onMounted(() => {
   // initQuery();
 
-  console.log("ExtSContainer>>>>>>>>>>onMounted")
+  //console.log("ExtSContainer>>>>>>>>>>onMounted")
 
 
 })
@@ -135,12 +135,12 @@ const open = (callback: Function, multiple: boolean = false, config: any, chosen
 }
 
 const handleSortChange = (sort: any) => {
-  console.log("handleSortChange>>>>", sort)
+  //console.log("handleSortChange>>>>", sort)
   //TODO 合并查询条件
 }
 
 const handleCheckChange = (list: any) => {
-  console.log("xxxx choosexxxx", list)
+  //console.log("xxxx choosexxxx", list)
   state.checkDataList = list;
 }
 
@@ -151,7 +151,7 @@ const loadData = (refresh: boolean = false) => {
   let {url, domain, cols, query, method} = state.config;
   let requestQuery = {...state.pageQuery, ...query, ...state.queryForm}
 
-  console.log(requestQuery)
+  //console.log(requestQuery)
   switch (method) {
     case 'get':
       $get(url, requestQuery).then((res: any) => {
@@ -201,21 +201,21 @@ const initQuery = () => {
   let {columns, query} = state.config;
   if (!u.isEmptyOrNull(columns)) {
     state.columns = state.initColumns.concat(columns);
-    console.log(state.columns)
+    //console.log(state.columns)
   }
-  console.log(state.config)
+  //console.log(state.config)
   if (query) {
     state.queryForm = {...state.queryForm, ...query}
     // Object.keys(query).forEach(k=>state.queryForm[k] = query[k]);
   }
-  console.log(state.queryForm)
+  //console.log(state.queryForm)
   state.init = true;
 
   nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value?.$el.clientHeight;
     state.height = bodyHeight - queryHeight - 150
-    console.log(state.height)
+    //console.log(state.height)
   })
 }
 

+ 4 - 4
admin-web/src/components/form/ExtSearch.vue

@@ -133,7 +133,7 @@ watch(()=>props.displayList,()=>{
   if (props.multiple) {
     if (props.displayList) {
       if (!Array.isArray(props.displayList)) {
-        console.error("value list error")
+        //console.error("value list error")
         return;
       }
       state.value.displays = props.displayList;
@@ -144,8 +144,8 @@ watch(()=>props.displayList,()=>{
     state.value.displayIds = [props.modelValue]
   }
 
-  console.log(state.value.displays)
-  console.log(state.value.displayIds)
+  //console.log(state.value.displays)
+  //console.log(state.value.displayIds)
 })
 
 onMounted(() => {
@@ -184,7 +184,7 @@ const emitData = () => {
   })
 }
 const chooseObject = () => {
-  console.log(props.config,props.multiple)
+  //console.log(props.config,props.multiple)
   nextTick(()=>{
     extSContainerRef.value?.open(
         chooseCallback,

+ 5 - 5
admin-web/src/components/form/ExtSelect.vue

@@ -86,13 +86,13 @@ const state = reactive({
 })
 
 watch(() => props.modelValue, (val) => {
-  console.log("watch>>>", val)
+  //console.log("watch>>>", val)
   state.modelVal = val;
 },{immediate:true})
 
 
 watch(() => props.dataList, (val) => {
-  console.log("watch>>>", val)
+  //console.log("watch>>>", val)
   nextTick(() => {
     if (!u.isEmptyOrNull(props.dataList)) {
       // state.list = props.dataList;
@@ -137,7 +137,7 @@ const loadData = () => {
         state.list = dataList.map((k: any) => {
           return {value: k[props.valueKey], label: k[props.labelKey]}
         })
-        console.log(state.list)
+        //console.log(state.list)
         // state.value.list = res?.list
       });
     } else {
@@ -165,7 +165,7 @@ const loadData = () => {
         }
 */
 
-        console.log(state.list)
+        //console.log(state.list)
         // state.value.list = res?.list
       });
     }
@@ -176,7 +176,7 @@ const loadData = () => {
 
 const handleValueChange = (val: any) => {
   nextTick(() => {
-    console.log("handleValueChange--->", val)
+    //console.log("handleValueChange--->", val)
     emit("update:modelValue", val);
     emit("on-change", val);
   })

+ 8 - 3
admin-web/src/components/form/ExtTable.vue

@@ -59,6 +59,10 @@
 
           <template v-else>
             <template v-if="field.render">
+              <ext-render
+                  class="z-w150"
+                  :data="row[field.prop]"
+                  :render-func="field.render"/>
             </template>
             <template v-else-if="field.type==='rich'">
               <p v-html="row[field.prop]"></p>
@@ -125,6 +129,7 @@ import {reactive, onMounted,defineAsyncComponent} from 'vue';
 import fieldUtil from "/@/utils/field";
 import ExtDLabel from "/@/components/form/ExtDLabel.vue";
 import ExtBoolean from "/@/components/form/ExtBoolean.vue";
+import ExtRender from "/@/components/form/ExtRender.vue";
 import u from "/@/utils/u";
 
 const ExtUpload = defineAsyncComponent(() => import("/@/components/form/ExtUpload.vue"));
@@ -167,16 +172,16 @@ const state: any = reactive({
 
 onMounted(() => {
   state.cols = fieldUtil.toTableShowField(props.columns);
-  console.table(state.cols)
+  //console.table(state.cols)
 })
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   emit("on-sort-change", column)
 }
 

+ 15 - 15
admin-web/src/components/form/ExtTreeSelect.vue

@@ -98,7 +98,7 @@ const emit = defineEmits(['update:modelValue', 'on-change']);
 
 watch(() => props.modelValue, (val) => {
   if (state.init) {
-    // console.log(val)
+    // //console.log(val)
     // extTreeSelectRef.value.setCheckNodes(null)
     reactiveModel()
   }
@@ -115,12 +115,12 @@ const reactiveModel = () => {
   } else {
     keys = val || [];
   }
-  console.log("reactiveModel>>>", keys)
+  //console.log("reactiveModel>>>", keys)
   extTreeSelectRef.value.setCheckedKeys(keys);
   if (keys) {
     let nodes = setupCheckNodes(state.treeData, keys)
     extTreeSelectRef.value.setCheckedNodes(nodes);
-    console.log(nodes)
+    //console.log(nodes)
   }
 
 }
@@ -147,7 +147,7 @@ const handleDisplayClick = () => {
   extTreeSelectRef.value.focus();
 }
 const handleVisibleChange = (visible: boolean) => {
-  // console.log("visible>>>", visible)
+  // //console.log("visible>>>", visible)
   if (visible) {
     loadData();
   }
@@ -159,19 +159,19 @@ const handleSelectClear = () => {
 }
 
 const handleTreeCheck = () => {
-  // console.log(JSON.stringify(val))
+  // //console.log(JSON.stringify(val))
 
   if (!extTreeSelectRef.value) {
-    console.error("null select ref")
+    //console.error("null select ref")
   }
   emitData();
 
 }
 
 const emitData = () => {
-  // console.error(state.modelValue)
+  // //console.error(state.modelValue)
   let data = extTreeSelectRef.value.getCheckedNodes();
-  // console.error(data)
+  // //console.error(data)
   if (props.multiple) {
     if (data && data.length > 0) {
       emit("update:modelValue", data.map((k: any) => k[props.nodeKey]));
@@ -194,12 +194,12 @@ const emitData = () => {
 
 
 // const handleCurrentChange = (val,event)=>{
-//   console.log(val)
-//   console.log(event)
+//   //console.log(val)
+//   //console.log(event)
 // }
 
 const filterNodeMethod = (value: string, data: any) => {
-  // console.log(data, value)
+  // //console.log(data, value)
   return data[props.label].includes(value)
 }
 
@@ -219,7 +219,7 @@ const loadDeptUserData = () => {
   $body(`/department/treeV2`).then((res: any) => {
     if (!u.isEmptyOrNull(res)) {
       recursiveArrayV2(res)
-      // console.log(res)
+      // //console.log(res)
       state.treeData = res;
       state.loading = false;
       reactiveModel()
@@ -234,7 +234,7 @@ const loadDeptData = () => {
   $body(`/department/tree`).then((res: any) => {
     if (!u.isEmptyOrNull(res)) {
       // let result: Array<SelectTreeType> = recursiveArray([res])
-      // console.log(res)
+      // //console.log(res)
       state.treeData = res;
     } else {
       ElMessage.info("暂无部门信息");
@@ -265,7 +265,7 @@ const loadData = () => {
 }
 
 watch(() => props.displayList, (val) => {
-  console.log("displayList",val)
+  //console.log("displayList",val)
   if (props.displayList) {
     if (props.multiple) {
       state.displays = [...props.displayList]
@@ -273,7 +273,7 @@ watch(() => props.displayList, (val) => {
       state.displays = [props.displayList]
     }
   }
-  console.log(JSON.stringify(state.displays))
+  //console.log(JSON.stringify(state.displays))
 },{deep:true,immediate:true})
 
 onMounted(() => {

+ 2 - 2
admin-web/src/components/form/ExtUpload.vue

@@ -87,7 +87,7 @@ watch(() => props.modelValue, (nv, v) => {
   } else {
     state.imageList = []
   }
-  console.log(state.imageList)
+  //console.log(state.imageList)
   // imageUrl.value = u.fmt.fmtUrl(o);
 }, {immediate: true})
 
@@ -120,7 +120,7 @@ const handleAvatarSuccess: UploadProps['onSuccess'] = (
     uploadFile
 ) => {
   Msg.hideLoading();
-  console.log(uploadFile, response)
+  //console.log(uploadFile, response)
   let {url, uuid} = response.data;
   imageUrl.value = url;
   // imageUrl.value = URL.createObjectURL(uploadFile.raw!)

+ 1 - 1
admin-web/src/components/pdf/index.vue

@@ -70,7 +70,7 @@ const open = (url: string) => {
   const serverUrl = import.meta.env.VITE_API_URL
   state.pdfUrl = `${serverUrl}/file/preview`
   state.dialog.isShowDialog = true;
-  console.log("openxxx")
+  //console.log("openxxx")
 };
 // 关闭弹窗
 const onClose = () => {

+ 1 - 1
admin-web/src/directive/authDirective.ts

@@ -37,7 +37,7 @@ export function authDirective(app: App) {
 					}
 				});
 			});
-			console.log("v-auths")
+			//console.log("v-auths")
 			if (!flag) el.parentNode.removeChild(el);
 		},
 	});

+ 1 - 1
admin-web/src/layout/logo/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="layout-logo" v-if="setShowLogo" @click="onThemeConfigChange">
 		<img :src="logoMini" class="layout-logo-medium-img" />
-    <span><font color="#ffffff" ><b>{{ themeConfig.globalTitle }}</b></font></span>
+    <span><i color="#ffffff" ><b>{{ themeConfig.globalTitle }}</b></i></span>
 	</div>
 <!--	<div class="layout-logo-size" v-else @click="onThemeConfigChange">-->
 <!--		<img :src="logoMini" class="layout-logo-size-img" />-->

+ 2 - 2
admin-web/src/layout/navBars/breadcrumb/breadcrumb.vue

@@ -86,8 +86,8 @@ const getBreadcrumbList = (arr: RouteItems) => {
 // 当前路由字符串切割成数组,并删除第一项空内容
 const initRouteSplit = (path: string) => {
 	if (!themeConfig.value.isBreadcrumb) return false;
-  // console.log(path)
-  // console.log(routesList)
+  // //console.log(path)
+  // //console.log(routesList)
 	state.breadcrumbList = [];
 	// state.breadcrumbList = [routesList.value[0]];
 	state.routeSplit = path.split('/');

+ 1 - 1
admin-web/src/layout/navBars/breadcrumb/index.vue

@@ -49,7 +49,7 @@ const setFilterRoutes = () => {
   let routerList = routesList.value;
 	if (layout === 'classic' && isClassicSplitMenu) {
 
-    // console.log(routerList)
+    // //console.log(routerList)
 		state.menuList = delClassicChildren(filterRoutesFun(routesList.value));
 		const resData = setSendClassicChildren(route.path);
 		mittBus.emit('setSendClassicChildren', resData);

+ 10 - 9
admin-web/src/layout/navBars/breadcrumb/toolbar.vue

@@ -184,7 +184,7 @@ const onSwitchTheme = () => {
 
 const userInfos = computed(() => {
   let user = storesUserInfo.userInfos
-  console.error(user)
+  //console.error(user)
   return user || {};
 })
 
@@ -264,7 +264,7 @@ const onSearchClick = () => {
 
 //站点切换
 const handleStationChange = (stationId: string) => {
-  console.log(stationId)
+  //console.log(stationId)
 
   let station = state.stationList.find((k: any) => k.stationId === stationId)
   if (station) {
@@ -307,18 +307,19 @@ onMounted(() => {
 });
 
 const loadStationList = () => {
-  $body(`/washStation/list`, {pageNum: 1024}).then((res: any) => {
-    state.stationList = res;
-    if (res && res.length > 0) {
-      state.currentStation = res[0];
+  $body(`/washStation/list`, {pageNum: 1,pageSize:1024}).then((res: any) => {
+    let {list} = res;
+    state.stationList = list;
+    if (list && list.length > 0) {
+      state.currentStation = list[0];
       setTimeout(()=>{
-        mittBus.emit('stationChangeRefresh', res[0].stationId);
-        Session.set("currentStationId",res[0].stationId)
+        mittBus.emit('stationChangeRefresh', list[0].stationId);
+        Session.set("currentStationId",list[0].stationId)
       },200)
 
     }
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
   })
 }
 </script>

+ 4 - 4
admin-web/src/layout/navBars/tagsView/tagsView.vue

@@ -421,7 +421,7 @@ const transUrlParams = (v: RouteItem) => {
 };
 // 处理 tagsView 高亮(多标签详情时使用,单标签详情未使用)
 const setTagsViewHighlight = (v: RouteToFrom) => {
-  // console.log("setTagsViewHighlight>>>",v)
+  // //console.log("setTagsViewHighlight>>>",v)
 	let params = v.query && Object.keys(v.query).length > 0 ? v.query : v.params;
 	if (!params || Object.keys(params).length <= 0) return v.path;
 	let path = '';
@@ -575,14 +575,14 @@ onBeforeUpdate(() => {
 });
 // 页面加载时
 onMounted(() => {
-  // console.log("onMounted")
+  // //console.log("onMounted")
 	// 初始化 pinia 中的 tagsViewRoutes 列表
 	getTagsViewRoutes();
 	initSortable();
 });
 // 路由更新时(组件内生命钩子)
 onBeforeRouteUpdate(async (to) => {
-  // console.log("onBeforeRouteUpdate")
+  // //console.log("onBeforeRouteUpdate")
 	state.routeActive = setTagsViewHighlight(to);
 	state.routePath = to.meta.isDynamic ? to.meta.isDynamicPath : to.path;
 	await addTagsView(to.path, <RouteToFrom>to);
@@ -592,7 +592,7 @@ onBeforeRouteUpdate(async (to) => {
 watch(
 	pinia.state,
 	(val) => {
-    // console.log("watch routes>>>",val.tagsViewRoutes.tagsViewRoutes, state.tagsViewRoutesList)
+    // //console.log("watch routes>>>",val.tagsViewRoutes.tagsViewRoutes, state.tagsViewRoutesList)
 		if (val.tagsViewRoutes.tagsViewRoutes.length === state.tagsViewRoutesList.length) return false;
 		getTagsViewRoutes();
 	},

+ 2 - 2
admin-web/src/layout/navMenu/horizontal.vue

@@ -93,7 +93,7 @@ const setSendClassicChildren = (path: string) => {
 };
 // 设置页面当前路由高亮
 const setCurrentRouterHighlight = (currentRoute: RouteToFrom) => {
-  console.log("setCurrentRouterHighlight")
+  //console.log("setCurrentRouterHighlight")
 	const { path, meta } = currentRoute;
 	if (themeConfig.value.layout === 'classic') {
 		state.defaultActive = `/${path?.split('/')[1]}`;
@@ -102,7 +102,7 @@ const setCurrentRouterHighlight = (currentRoute: RouteToFrom) => {
 		if (pathSplit.length >= 4 && meta?.isHide) state.defaultActive = pathSplit.splice(0, 3).join('/');
 		else state.defaultActive = path;
 	}
-  console.log("xxxx",state.defaultActive)
+  //console.log("xxxx",state.defaultActive)
 };
 // 打开外部链接
 const onALinkClick = (val: RouteItem) => {

+ 1 - 1
admin-web/src/layout/navMenu/vertical.vue

@@ -81,7 +81,7 @@ const onALinkClick = (val: RouteItem) => {
 onMounted(() => {
 	state.defaultActive = setParentHighlight(route);
 
-  console.log(menuLists)
+  //console.log(menuLists)
 });
 // 路由更新时
 onBeforeRouteUpdate((to) => {

+ 1 - 1
admin-web/src/layout/routerView/parent.vue

@@ -102,7 +102,7 @@ watch(
 	() => route.fullPath,
 	() => {
 		state.refreshRouterViewKey = decodeURI(route.fullPath);
-    console.error(route.fullPath,	state.refreshRouterViewKey)
+    //console.error(route.fullPath,	state.refreshRouterViewKey)
 	},
 	{
 		immediate: true,

+ 7 - 7
admin-web/src/main.ts

@@ -1,9 +1,9 @@
-import { createApp } from 'vue'; //vu3
+import {createApp} from 'vue'; //vu3
 import pinia from '/@/stores'; //状态管理器
 import App from '/@/App.vue';
 import router from '/@/router'; //路由
-import { directive } from '/@/directive'; //指令
-import { i18n } from '/@/i18n'; //国际化
+import {directive} from '/@/directive'; //指令
+import {i18n} from '/@/i18n'; //国际化
 import other from '/@/utils/other';  //工具类
 import mitt from 'mitt'
 
@@ -23,16 +23,16 @@ import VueGridLayout from 'vue-grid-layout';
 const app = createApp(App);
 
 
-import { useUserInfo } from '/@/stores/userInfo';
+import {useUserInfo} from '/@/stores/userInfo';
 
 // @ts-ignore 全局消息总线
 app.config.globalProperties.$bus = new mitt();
 //权限校验
-app.config.globalProperties.$auth =(auth:any,all:boolean=false)=>{
-    if(!auth){
+app.config.globalProperties.$auth = (auth: any, all: boolean = false) => {
+    console.log("$auth:", auth)
+    if (!auth) {
         return true;
     }
-    // console.log("$auth:",auth)
     return true;
 }
 

+ 6 - 6
admin-web/src/router/frontEnd.ts

@@ -45,9 +45,9 @@ export async function initFrontEndControlRoutes() {
  * @link 参考:https://next.router.vuejs.org/zh/api/#addroute
  */
 export async function setAddRoute() {
-	// console.log("添加路由",adminRoutes)
+	// //console.log("添加路由",adminRoutes)
 	await setFilterRouteEnd().forEach((route: RouteRecordRaw) => {
-		// console.log("添加路由:",route)
+		// //console.log("添加路由:",route)
 		router.addRoute(route);
 	});
 }
@@ -116,7 +116,7 @@ export function setCacheTagsViewRoutes() {
 	let permMenus = setFilterHasPermsMenu(staticRoutes, userInfos.value.permList);
 	// 添加到 pinia setTagsViewRoutes 中
 	let cachetagsViewRoutes = formatTwoStageRoutes(formatFlatteningRoutes(permMenus))[0].children
-	// console.log("piana tagsViewRoutes>>>",cachetagsViewRoutes)
+	// //console.log("piana tagsViewRoutes>>>",cachetagsViewRoutes)
 	tagsViewRoutes.setTagsViewRoutes(cachetagsViewRoutes);
 }
 
@@ -132,9 +132,9 @@ export function setFilterMenuAndCacheTagsViewRoutes() {
 	//管理后台路由设置
 	// debugger
 	let routes = [...staticRoutes]
-	// console.log("设置后台菜单>>>",adminRoutes,userInfos.value.permList)
+	// //console.log("设置后台菜单>>>",adminRoutes,userInfos.value.permList)
 	let menuList = setFilterHasPermsMenu(adminRoutes, userInfos.value.permList);
-	console.log("设置后台菜单>>>",menuList)
+	//console.log("设置后台菜单>>>",menuList)
 	storesRoutesList.setRoutesList(menuList);
 	setCacheTagsViewRoutes();
 }
@@ -167,7 +167,7 @@ export function setFilterHasPermsMenu(routes: any, permList:Array<string>=[]) {
 		const item = { ...route };
 		if (hasMenuPermission(permList, item)) {
 			if (item.children) item.children = setFilterHasPermsMenu(item.children, permList);
-			// console.log(item)
+			// //console.log(item)
 			menuList.push(item);
 		}
 	});

+ 8 - 8
admin-web/src/router/index.ts

@@ -46,14 +46,14 @@ export const router = createRouter({
  * @returns 返回处理后的一维路由菜单数组
  */
 export function formatFlatteningRoutes(arr: any) {
-    console.log("formatFlatteningRoutes",arr)
+    //console.log("formatFlatteningRoutes",arr)
     if (arr.length <= 0) return false;
     for (let i = 0; i < arr.length; i++) {
         if (arr[i].children) {
             arr = arr.slice(0, i + 1).concat(arr[i].children, arr.slice(i + 1));
         }
     }
-    console.log("formatFlatteningRoutes1111",arr)
+    //console.log("formatFlatteningRoutes1111",arr)
     return arr;
 }
 
@@ -65,7 +65,7 @@ export function formatFlatteningRoutes(arr: any) {
  * @returns 返回将一维数组重新处理成 `定义动态路由(dynamicRoutes)` 的格式
  */
 export function formatTwoStageRoutes(arr: any) {
-    // console.log("formatTwoStageRoutes", arr)
+    // //console.log("formatTwoStageRoutes", arr)
     if (arr.length <= 0) return false;
     const newArr: any = [];
     const cacheList: Array<string> = [];
@@ -103,7 +103,7 @@ export function formatTwoStageRoutes(arr: any) {
     });
     const stores = useKeepALiveNames(pinia);
     stores.setCacheKeepAlive(cacheList);
-    // console.log(newArr)
+    // //console.log(newArr)
     return newArr;
 }
 
@@ -112,11 +112,11 @@ export function formatTwoStageRoutes(arr: any) {
 // 路由加载前
 router.beforeEach(async (to, from, next) => {
 
-    console.log("route>>>:", from.path,to.path)
+    //console.log("route>>>:", from.path,to.path)
     NProgress.configure({showSpinner: true});
     if (to.meta.title) NProgress.start();
     const token = Session.get('accessToken');
-    // console.error(token)
+    // //console.error(token)
     if (to.path === '/login' && !token) {
         next();
         NProgress.done();
@@ -131,8 +131,8 @@ router.beforeEach(async (to, from, next) => {
         } else {
             const storesRoutesList = useRoutesList(pinia);
             const {routesList} = storeToRefs(storesRoutesList);
-            //console.log(routesList.value.length)
-            //console.log(routesList.value)
+            ////console.log(routesList.value.length)
+            ////console.log(routesList.value)
             if (routesList.value.length === 0) {
                 if (isRequestRoutes) {
                     // 后端控制路由:路由数据初始化,防止刷新时丢失

+ 5 - 5
admin-web/src/stores/keepAliveNames.ts

@@ -15,25 +15,25 @@ export const useKeepALiveNames = defineStore('keepALiveNames', {
 	}),
 	actions: {
 		async setCacheKeepAlive(data: Array<string>) {
-			// console.log("setCacheKeepAlive>>>",data)
+			// //console.log("setCacheKeepAlive>>>",data)
 			this.keepAliveNames = data;
 		},
 		async addCachedView(view: any) {
-			console.log("addCachedView>>>",view)
+			//console.log("addCachedView>>>",view)
 			if (view.meta.isKeepAlive) this.cachedViews?.push(view.name);
 		},
 		async delCachedView(view: any) {
-			console.log("delCachedView>>>",view)
+			//console.log("delCachedView>>>",view)
 			const index = this.cachedViews.indexOf(view.name);
 			index > -1 && this.cachedViews.splice(index, 1);
 		},
 		async delOthersCachedViews(view: any) {
-			console.log("delOthersCachedViews>>>",view)
+			//console.log("delOthersCachedViews>>>",view)
 			if (view.meta.isKeepAlive) this.cachedViews = [view.name];
 			else this.cachedViews = [];
 		},
 		async delAllCachedViews() {
-			console.log("delAllCachedViews>>>")
+			//console.log("delAllCachedViews>>>")
 			this.cachedViews = [];
 		},
 	},

+ 1 - 1
admin-web/src/stores/routesList.ts

@@ -14,7 +14,7 @@ export const useRoutesList = defineStore('routesList', {
 	}),
 	actions: {
 		async setRoutesList(data: Array<string>) {
-			console.log("setRoutesList>>>",data)
+			//console.log("setRoutesList>>>",data)
 			this.routesList = data;
 		},
 		async setColumnsMenuHover(bool: Boolean) {

+ 3 - 3
admin-web/src/stores/tagsViewRoutes.ts

@@ -13,15 +13,15 @@ export const useTagsViewRoutes = defineStore('tagsViewRoutes', {
 	}),
 	actions: {
 		async setTagsViewRoutes(data: Array<string>) {
-			// console.log("setTagsViewRoutes>>>",data)
+			// //console.log("setTagsViewRoutes>>>",data)
 			this.tagsViewRoutes = data;
 		},
 		async addTagsViewRoute(route: any) {
-			// console.log("addTagsViewRoute>>>",route)
+			// //console.log("addTagsViewRoute>>>",route)
 			this.tagsViewRoutes.push(route)
 		},
 		setCurrenFullscreen(bool: Boolean) {
-			// console.log("setCurrenFullscreen>>>",bool)
+			// //console.log("setCurrenFullscreen>>>",bool)
 			Session.set('isTagsViewCurrenFull', bool);
 			this.isTagsViewCurrenFull = bool;
 		},

+ 200 - 200
admin-web/src/types/views.d.ts

@@ -2,56 +2,56 @@
  * views personal
  */
 type NewInfo = {
-	title: string;
-	date: string;
-	link: string;
+    title: string;
+    date: string;
+    link: string;
 };
 type Recommend = {
-	title: string;
-	msg: string;
-	icon: string;
-	bg: string;
-	iconColor: string;
+    title: string;
+    msg: string;
+    icon: string;
+    bg: string;
+    iconColor: string;
 };
 declare type PersonalState = {
-	newsInfoList: NewInfo[];
-	recommendList: Recommend[];
-	personalForm: {
-		name: string;
-		email: string;
-		autograph: string;
-		occupation: string;
-		phone: string;
-		sex: string;
-	};
+    newsInfoList: NewInfo[];
+    recommendList: Recommend[];
+    personalForm: {
+        name: string;
+        email: string;
+        autograph: string;
+        occupation: string;
+        phone: string;
+        sex: string;
+    };
 };
 
 /**
  * views visualizing
  */
 declare type Demo2State<T = any> = {
-	time: {
-		txt: string;
-		fun: number;
-	};
-	dropdownList: T[];
-	dropdownActive: string;
-	skyList: T[];
-	dBtnList: T[];
-	chartData4Index: number;
-	dBtnActive: number;
-	earth3DBtnList: T[];
-	chartData4List: T[];
-	myCharts: T[];
+    time: {
+        txt: string;
+        fun: number;
+    };
+    dropdownList: T[];
+    dropdownActive: string;
+    skyList: T[];
+    dBtnList: T[];
+    chartData4Index: number;
+    dBtnActive: number;
+    earth3DBtnList: T[];
+    chartData4List: T[];
+    myCharts: T[];
 };
 
 /**
  * views params
  */
 declare type ParamsState = {
-	value: string;
-	tagsViewName: string;
-	tagsViewNameIsI18n: boolean;
+    value: string;
+    tagsViewName: string;
+    tagsViewNameIsI18n: boolean;
 };
 
 /**
@@ -59,109 +59,109 @@ declare type ParamsState = {
  */
 // role
 declare interface RowRoleType {
-	roleName: string;
-	roleSign: string;
-	describe: string;
-	sort: number;
-	status: boolean;
-	createTime: string;
+    roleName: string;
+    roleSign: string;
+    describe: string;
+    sort: number;
+    status: boolean;
+    createTime: string;
 }
 
 interface SysRoleTableType extends TableType {
-	data: RowRoleType[];
+    data: RowRoleType[];
 }
 
 declare interface SysRoleState {
-	tableData: SysRoleTableType;
+    tableData: SysRoleTableType;
 }
 
 declare type TreeType = {
-	id: number;
-	label: string;
-	children?: TreeType[];
+    id: number;
+    label: string;
+    children?: TreeType[];
 };
 
 // user
 declare type RowUserType<T = any> = {
-	id:number,
-	userName: string;
-	userNickname: string;
-	roleSign: string;
-	department: string[];
-	phone: string;
-	email: string;
-	sex: string;
-	password: string;
-	overdueTime: T;
-	status: boolean;
-	describe: string;
-	createTime: T;
+    id: number,
+    userName: string;
+    userNickname: string;
+    roleSign: string;
+    department: string[];
+    phone: string;
+    email: string;
+    sex: string;
+    password: string;
+    overdueTime: T;
+    status: boolean;
+    describe: string;
+    createTime: T;
 };
 
 interface SysUserTableType extends TableType {
-	data: RowUserType[];
+    data: RowUserType[];
 }
 
 declare interface SysUserState {
-	tableData: SysUserTableType;
+    tableData: SysUserTableType;
 }
 
 declare type SelectTreeType = {
-	value: number;
-	label: string;
-	key?: string;
-	disabled?: boolean;
-	children?: SelectTreeType[];
+    value: number;
+    label: string;
+    key?: string;
+    disabled?: boolean;
+    children?: SelectTreeType[];
 };
 
 declare type DeptTreeType = {
-	deptName: string;
-	createTime: string;
-	status: boolean;
-	sort: number;
-	describe: string;
-	id: number | string;
-	children?: DeptTreeType[];
+    deptName: string;
+    createTime: string;
+    status: boolean;
+    sort: number;
+    describe: string;
+    id: number | string;
+    children?: DeptTreeType[];
 };
 
 // dept
 declare interface RowDeptType extends DeptTreeType {
-	deptLevel: string[];
-	person: string;
-	phone: string;
-	email: string;
+    deptLevel: string[];
+    person: string;
+    phone: string;
+    email: string;
 }
 
 interface SysDeptTableType extends TableType {
-	data: DeptTreeType[];
+    data: DeptTreeType[];
 }
 
 declare interface SysDeptState {
-	tableData: SysDeptTableType;
+    tableData: SysDeptTableType;
 }
 
 // dic
 type ListType = {
-	id: number;
-	label: string;
-	value: string;
+    id: number;
+    label: string;
+    value: string;
 };
 
 declare interface RowDicType {
-	dicName: string;
-	fieldName: string;
-	describe: string;
-	status: boolean;
-	createTime: string;
-	list: ListType[];
+    dicName: string;
+    fieldName: string;
+    describe: string;
+    status: boolean;
+    createTime: string;
+    list: ListType[];
 }
 
 interface SysDicTableType extends TableType {
-	data: RowDicType[];
+    data: RowDicType[];
 }
 
 declare interface SysDicState {
-	tableData: SysDicTableType;
+    tableData: SysDicTableType;
 }
 
 /**
@@ -169,126 +169,126 @@ declare interface SysDicState {
  */
 //  filtering
 declare type FilteringChilType = {
-	id: number | string;
-	label: string;
-	active: boolean;
+    id: number | string;
+    label: string;
+    active: boolean;
 };
 
 declare type FilterListType = {
-	img: string;
-	title: string;
-	evaluate: string;
-	collection: string;
-	price: string;
-	monSales: string;
-	id: number | string;
-	loading?: boolean;
+    img: string;
+    title: string;
+    evaluate: string;
+    collection: string;
+    price: string;
+    monSales: string;
+    id: number | string;
+    loading?: boolean;
 };
 
 declare type FilteringRowType = {
-	title: string;
-	isMore: boolean;
-	isShowMore: boolean;
-	id: number | string;
-	children: FilteringChilType[];
+    title: string;
+    isMore: boolean;
+    isShowMore: boolean;
+    id: number | string;
+    children: FilteringChilType[];
 };
 
 // tableRules
 declare type TableRulesHeaderType = {
-	prop: string;
-	width: string | number;
-	label: string;
-	isRequired?: boolean;
-	isTooltip?: boolean;
-	type: string;
+    prop: string;
+    width: string | number;
+    label: string;
+    isRequired?: boolean;
+    isTooltip?: boolean;
+    type: string;
 };
 
 declare type TableRulesState = {
-	tableData: {
-		data: EmptyObjectType[];
-		header: TableRulesHeaderType[];
-		option: SelectOptionType[];
-	};
+    tableData: {
+        data: EmptyObjectType[];
+        header: TableRulesHeaderType[];
+        option: SelectOptionType[];
+    };
 };
 
 declare type TableRulesOneProps = {
-	name: string;
-	email: string;
-	autograph: string;
-	occupation: string;
+    name: string;
+    email: string;
+    autograph: string;
+    occupation: string;
 };
 
 // tree
 declare type RowTreeType = {
-	id: number;
-	label: string;
-	label1: string;
-	label2: string;
-	isShow: boolean;
-	children?: RowTreeType[];
+    id: number;
+    label: string;
+    label1: string;
+    label2: string;
+    isShow: boolean;
+    children?: RowTreeType[];
 };
 
 // workflow index
 declare type NodeListState = {
-	id: string | number;
-	nodeId: string | undefined;
-	class: HTMLElement | string;
-	left: number | string;
-	top: number | string;
-	icon: string;
-	name: string;
+    id: string | number;
+    nodeId: string | undefined;
+    class: HTMLElement | string;
+    left: number | string;
+    top: number | string;
+    icon: string;
+    name: string;
 };
 
 declare type LineListState = {
-	sourceId: string;
-	targetId: string;
-	label: string;
+    sourceId: string;
+    targetId: string;
+    label: string;
 };
 
 declare type XyState = {
-	x: string | number;
-	y: string | number;
+    x: string | number;
+    y: string | number;
 };
 
 declare type WorkflowState<T = any> = {
-	leftNavList: T[];
-	dropdownNode: XyState;
-	dropdownLine: XyState;
-	isShow: boolean;
-	jsPlumb: T;
-	jsPlumbNodeIndex: null | number;
-	jsplumbDefaults: T;
-	jsplumbMakeSource: T;
-	jsplumbMakeTarget: T;
-	jsplumbConnect: T;
-	jsplumbData: {
-		nodeList: NodeListState[];
-		lineList: LineListState[];
-	};
+    leftNavList: T[];
+    dropdownNode: XyState;
+    dropdownLine: XyState;
+    isShow: boolean;
+    jsPlumb: T;
+    jsPlumbNodeIndex: null | number;
+    jsplumbDefaults: T;
+    jsplumbMakeSource: T;
+    jsplumbMakeTarget: T;
+    jsplumbConnect: T;
+    jsplumbData: {
+        nodeList: NodeListState[];
+        lineList: LineListState[];
+    };
 };
 
 // workflow drawer
 declare type WorkflowDrawerNodeState<T = any> = {
-	node: { [key: string]: T };
-	nodeRules: T;
-	form: T;
-	tabsActive: string;
-	loading: {
-		extend: boolean;
-	};
+    node: { [key: string]: T };
+    nodeRules: T;
+    form: T;
+    tabsActive: string;
+    loading: {
+        extend: boolean;
+    };
 };
 
 declare type WorkflowDrawerLabelType = {
-	type: string;
-	label: string;
+    type: string;
+    label: string;
 };
 
 declare type WorkflowDrawerState<T = any> = {
-	isOpen: boolean;
-	nodeData: {
-		type: string;
-	};
-	jsplumbConn: T;
+    isOpen: boolean;
+    nodeData: {
+        type: string;
+    };
+    jsplumbConn: T;
 };
 
 /**
@@ -296,52 +296,52 @@ declare type WorkflowDrawerState<T = any> = {
  */
 // tableDemo
 declare type TableDemoPageType = {
-	pageNum: number;
-	pageSize: number;
+    pageNum: number;
+    pageSize: number;
 };
 
 declare type TableHeaderType = {
-	key: string;
-	title: string;
-	type: string | number;
-	colWidth: string;
-	width?: string | number;
-	height?: string | number;
-	isCheck: boolean;
+    key: string;
+    title: string;
+    type: string | number;
+    colWidth: string;
+    width?: string | number;
+    height?: string | number;
+    isCheck: boolean;
 };
 
 declare type TableSearchType = {
-	label: string;
-	prop: string;
-	placeholder: string;
-	required: boolean;
-	type: string;
-	options?: SelectOptionType[];
+    label: string;
+    prop: string;
+    placeholder: string;
+    required: boolean;
+    type: string;
+    options?: SelectOptionType[];
 };
 
 declare type TableDemoState = {
-	tableData: {
-		data: EmptyObjectType[];
-		header: TableHeaderType[];
-		config: {
-			total: number;
-			loading: boolean;
-			isBorder: boolean;
-			isSelection: boolean;
-			isSerialNo: boolean;
-			isOperate: boolean;
-		};
-		search: TableSearchType[];
-		param: EmptyObjectType;
-	};
+    tableData: {
+        data: EmptyObjectType[];
+        header: TableHeaderType[];
+        config: {
+            total: number;
+            loading: boolean;
+            isBorder: boolean;
+            isSelection: boolean;
+            isSerialNo: boolean;
+            isOperate: boolean;
+        };
+        search: TableSearchType[];
+        param: EmptyObjectType;
+    };
 };
 
 declare  type Dict = {
-	type:string,
-	code:number,
-	value:string,
-	des?:string,
-	color?:string
+    name: string,
+    code: number,
+    value: string,
+    des?: string,
+    color?: string
 }
 
 declare type Dicts<T extends Dict = any> = T[];

+ 15 - 15
admin-web/src/utils/field.ts

@@ -59,13 +59,13 @@ const fieldUtil = {
             //查询框分类  文本、数字、下拉、部门、用户、搜索框
             let fconfig = {
                 ...f,
-                xs: 12,
-                sm: 8,
-                md: 6,
-                lg: 6,
-                xl: 3,
+                xs: 4,
+                sm: 3,
+                md: 3,
+                lg: 2,
+                xl: 1,
                 rules: [],
-                placeholder: '请输入' + f.label,
+                placeholder:  f.label,
                 readonly: false
             }
             if (fconfig.conf) {
@@ -92,7 +92,7 @@ const fieldUtil = {
                             placeholder: `${f.label}${operation.remark}`
                         });
                     } else {
-                        console.error("不能识别的操作符:", f.conf.op)
+                        //console.error("不能识别的操作符:", f.conf.op)
                     }
 
                 } else {
@@ -114,7 +114,7 @@ const fieldUtil = {
             }
 
         }
-        console.log("toFormQueryField>>>>", JSON.stringify(ret))
+        //console.log("toFormQueryField>>>>", JSON.stringify(ret))
         return ret;
 
     },
@@ -123,7 +123,7 @@ const fieldUtil = {
         if (u.isEmptyOrNull(fields)) {
             return ret;
         }
-        console.log("toFormCreateField>>>>", JSON.stringify(fields))
+        //console.log("toFormCreateField>>>>", JSON.stringify(fields))
         for (let i = 0; i < fields.length; i++) {
             let f = fields[i];
             //表单 分类  文本、数字、下拉、部门、用户、搜索框
@@ -154,7 +154,7 @@ const fieldUtil = {
             ret.push(fconfig);
 
         }
-        console.log("toFormCreateField>>>>", JSON.stringify(ret))
+        //console.log("toFormCreateField>>>>", JSON.stringify(ret))
         return ret;
     },
     toTableShowField(fields: Array<IField>): Array<IField> {
@@ -182,7 +182,7 @@ const fieldUtil = {
             }
             ret.push(f);
         }
-        console.log("toTableShowField>>>>", JSON.stringify(ret))
+        //console.log("toTableShowField>>>>", JSON.stringify(ret))
         return ret;
     },
     toWorkflowField(fields: Array<IField>): Array<IField> {
@@ -194,7 +194,7 @@ const fieldUtil = {
         if (u.isEmptyOrNull(fields)) {
             return ret;
         }
-        console.log("toTaskWriteField>>>>", JSON.stringify(fields))
+        //console.log("toTaskWriteField>>>>", JSON.stringify(fields))
         for (let i = 0; i < fields.length; i++) {
             let f = fields[i];
             let conf = f.conf||{};
@@ -226,7 +226,7 @@ const fieldUtil = {
             ret.push(fconfig);
 
         }
-        console.log("toTaskWriteField>>>>", JSON.stringify(ret))
+        //console.log("toTaskWriteField>>>>", JSON.stringify(ret))
         return ret;
     },
     convertOperate(op: string) {
@@ -356,7 +356,7 @@ const fieldUtil = {
         return ret;
     },
     setFormSortQuery(order: any, formQuery: any) {
-        console.log(order, formQuery)
+        //console.log(order, formQuery)
         //
         let key = order?.column?.columnKey || order?.prop;
         if (!key) {
@@ -382,7 +382,7 @@ const fieldUtil = {
             }
         }
 
-        console.log(order, formQuery)
+        //console.log(order, formQuery)
     }
 }
 

+ 2 - 2
admin-web/src/utils/message.ts

@@ -28,10 +28,10 @@ export const Msg = {
                 buttonSize:'default'
             }
         ).then((v) => {
-            console.log(v)
+            //console.log(v)
             return Promise.resolve();
         }).catch(e => {
-            console.error(e)
+            //console.error(e)
             return Promise.reject(e);
         })
     },

+ 4 - 4
admin-web/src/utils/request.ts

@@ -43,7 +43,7 @@ service.interceptors.response.use(
     (response) => {
         // 对响应数据做点什么
         const res = response.data;
-        // console.log(res)
+        // //console.log(res)
         if (res.code && res.code !== 0) {
             // `token` 过期或者账号已在别处登录
             if (res.code === 401) {
@@ -67,7 +67,7 @@ service.interceptors.response.use(
         }
     },
     (error) => {
-        // console.error(error)
+        // //console.error(error)
         // 对响应错误做点什么
         if (error.message.indexOf('timeout') != -1) {
             ElMessage.error('网络超时');
@@ -129,7 +129,7 @@ export function $get(url: string, params = {}, showLoading = false) {
             ////if(showLoading)Spin.hide();
             resolve(response.data);
         }).catch(err => {
-            console.error("err=>" + err)
+            //console.error("err=>" + err)
             ////if(showLoading)Spin.hide();
             reject(err)
         })
@@ -146,7 +146,7 @@ export function $post(url: string, data = {}, showLoading = false) {
                 ////if(showLoading)Spin.hide();
                 resolve(response.data);
             }, err => {
-                console.error("err=>" + err)
+                //console.error("err=>" + err)
                 ////if(showLoading)Spin.hide();
                 reject(err)
             })

+ 1 - 1
admin-web/src/utils/storage.ts

@@ -9,7 +9,7 @@ import Cookies from 'js-cookie';
 export const Local = {
 	// 查看 v2.4.3版本更新日志
 	setKey(key: string) {
-		// console.log(storesThemeConfig.themeConfig.prefix)
+		// //console.log(storesThemeConfig.themeConfig.prefix)
 		// @ts-ignore
 		return `${__NEXT_NAME__}:${key}`;
 	},

+ 33 - 5
admin-web/src/utils/u.ts

@@ -174,7 +174,7 @@ const u = {
     },
 
     isEmptyOrNull: function (exp: any) {
-        return !exp || typeof (exp) == "undefined" || "undefined" === exp || exp.length === 0 || exp === '' || JSON.stringify(exp) === "{}";
+        return !exp || typeof (exp) == "undefined" || "undefined" === exp || exp.length === 0 || exp === '' ;
     },
     pad: function (val: any, len: number, ch: string = '0') {
         return val.toString().padStart(len, ch);
@@ -536,7 +536,7 @@ const u = {
             if (v.indexOf("http") === 0) {
                 return v;
             }
-            console.log(v, fileUrl)
+            //console.log(v, fileUrl)
             // return fileUrl + v;
             return `${fileUrl}${v}`
         },
@@ -633,6 +633,33 @@ const u = {
                 return u.pad(n, 2)
             }).join(':')
         },
+        fmtDuration(ms:number){
+            let seconds = Math.floor(ms / 1000);
+            let minutes = Math.floor(seconds / 60);
+            let hours = Math.floor(minutes / 60);
+            let days = Math.floor(hours / 24);
+
+            hours %= 24;
+            minutes %= 60;
+            seconds %= 60;
+
+            // 构建时长字符串
+            let durationStr = '';
+            if (days > 0) {
+                durationStr += `${days}天 `;
+            }
+            if (hours > 0) {
+                durationStr += `${hours}小时 `;
+            }
+            if (minutes > 0) {
+                durationStr += `${minutes}分钟 `;
+            }
+            if (seconds > 0 || !durationStr) { // 如果没有小时和分钟,至少显示秒
+                durationStr += `${seconds}秒`;
+            }
+
+            return durationStr.trim(); // 去除可能的前后空格
+        },
         fmtServerUrl(v: any) {
             if (!v) {
                 return null;
@@ -663,19 +690,20 @@ const u = {
                 return null;
             }
         },
-        fmtDict(v: number, type: string) {
+        fmtDict(v: any, type: string) {
             if (v == null) {
                 return "";
             }
+
             const dicts = Session.get("dicts");
             if (u.isEmptyOrNull(dicts)) {
                 return '--'
             }
-            let dict = (<Dicts>dicts).find(k => k.type == type && k.code === v);
+            let dict = dicts[type].find(k =>  k.value == v);
             if (u.isEmptyOrNull(dict)) {
                 return "--";
             }
-            return dict.value;
+            return dict.name;
         },
     }
 }

+ 3 - 3
admin-web/src/views/admin/account/detail.vue

@@ -129,14 +129,14 @@ const onCancel = () => {
 // 提交
 const onSubmit = () => {
   formRef.value.validate((valid, fields) => {
-    // console.log('basic checkForm!', valid,fields)
+    // //console.log('basic checkForm!', valid,fields)
     if (valid) {
       state.btnLoading = true;
       const url = state.ruleForm.id > 0 ? "adminUser/modify" : "adminUser/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -155,7 +155,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据

+ 3 - 3
admin-web/src/views/admin/account/index.vue

@@ -225,7 +225,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -262,12 +262,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 2 - 2
admin-web/src/views/admin/banner/dialog.vue

@@ -182,7 +182,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -194,7 +194,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据

+ 3 - 3
admin-web/src/views/admin/banner/index.vue

@@ -228,7 +228,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -250,12 +250,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 0 - 284
admin-web/src/views/admin/config/dict/dialog.vue

@@ -1,284 +0,0 @@
-<template>
-  <div class="system-dic-dialog-container">
-    <el-dialog
-        :title="state.dialog.title"
-        v-model="state.dialog.isShowDialog"
-        width="869px"
-        draggable
-        destroy-on-close
-        :close-on-click-modal="false"
-    @close="closeDialog">
-      <el-alert v-if="state.ruleForm.id>0" title="字典修改影响全局数据,请谨慎修改" type="error" :closable="false" class="mb20"></el-alert>
-      <el-form ref="formRef" :model="state.ruleForm" size="default" label-width="90px">
-        <el-row :gutter="35">
-          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-            <el-form-item label="字典类型">
-              <el-input v-model="state.ruleForm.type" placeholder="请输入字典名称" :disabled="state.ruleForm.id>0"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-            <el-form-item label="字典描述">
-              <el-input v-model="state.ruleForm.des" type="textarea" placeholder="请输入字典描述" @change="handleSetupDIctDes"
-                        maxlength="150" show-word-limit></el-input>
-            </el-form-item>
-          </el-col>
-
-          <!--					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-                      <el-form-item label="字典状态">
-                        <el-switch v-model="state.ruleForm.status" inline-prompt active-text="启" inactive-text="禁"></el-switch>
-                      </el-form-item>
-                    </el-col>-->
-
-        </el-row>
-      </el-form>
-      <el-card shadow="hover">
-        <el-button :top="-21" :left="-21" icon="Plus" title="新增" placement="leftTop" @click="onAddRow" v-auth="'dict.add'"></el-button>
-<!--        <div v-waves class="triangle-left-btn" @click="onAddRow" v-auth="'dict.add'" title="新增" >
-          <el-icon style="margin-top: -45px;margin-left:5px;color: #fff;font-weight: bold;font-size: 18px;">
-
-            <ele-Plus/>
-          </el-icon>
-        </div>-->
-        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-
-          <el-row :gutter="35" v-for="(v, k) in state.ruleForm.list" :key="k">
-            <el-col :xs="24" :sm="5" :md="5" :lg="5" :xl="5" class="mb20">
-              <el-form-item :prop="`list[${k}].label`" class="dict-head">
-                <template #label>
-
-                  <el-button type="danger" circle size="small" @click="onDelRow(k)" >
-                    <SvgIcon name="ele-Delete"></SvgIcon>
-                  </el-button>
-                  <span class="ml10" :style="{'color':v.color}">名称</span>
-                </template>
-                <el-input v-model="v.label" style="width: 100%" placeholder="请输入字典名称"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="5" :md="5" :lg="5" :xl="5" class="mb20">
-              <el-form-item label="码值" :prop="`list[${k}].value`">
-                <el-input-number
-                    v-model="v.value"
-                    controls-position="right"
-                    :min="1"
-                    :max="100"
-                    placeholder="请输入字典码值"
-                ></el-input-number>
-                <!--                <el-input type="number" v-model="v.value" style="width: 100%" ></el-input>-->
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="5" :md="5" :lg="5" :xl="5" class="mb20">
-              <el-form-item label="排序" :prop="`list[${k}].value`">
-                <el-input-number
-                    v-model="v.weight"
-                    controls-position="right"
-                    :min="1"
-                    :max="100"
-                    placeholder="请输入排序权重"
-                ></el-input-number>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="5" :md="5" :lg="5" :xl="5" class="mb20">
-              <el-form-item label="颜色" :prop="`list[${k}].value`">
-                <ExtColor v-model="v.color"></ExtColor>
-              </el-form-item>
-            </el-col>
-
-            <el-col :xs="24" :sm="4" :md="4" :lg="4" :xl="4" class="mb20">
-              <el-form-item label="图标" :prop="`list[${k}].icon`">
-                <ExtIcon v-model="v.icon" />
-<!--                <IconSelector @get="onGetIcon" @clear="onClearIcon" v-model="v.icon" />-->
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-col>
-      </el-card>
-      <template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel" size="default">取 消</el-button>
-					<el-button type="primary" @click="onSubmit" :loading="state.btnLoading"
-                     size="default">{{ state.dialog.submitTxt }}</el-button>
-				</span>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup lang="ts" name="DictDialog">
-import {reactive, ref,toRaw,defineAsyncComponent} from 'vue';
-import {Msg} from "/@/utils/message";
-import {$body, $get} from "/@/utils/request";
-import u from '/@/utils/u'
-import ExtColor from "/@/components/form/ExtColor.vue";
-import {verifySpecialChar} from "/@/utils/toolsValidate";
-const ExtIcon = defineAsyncComponent(() => import('/@/components/form/ExtIcon.vue'));
-
-
-// 定义子组件向父组件传值/事件
-const emit = defineEmits(['refresh']);
-const formRef = ref();
-
-// 定义变量内容
-const dicDialogFormRef = ref();
-
-const initState =()=>( {
-  ruleForm: {
-    dicName: '', // 字典名称
-    fieldName: '', // 字段名
-    status: true, // 字典状态
-    list: [] as Array<any>, // 子集字段 + 属性值
-    des: '', // 字典描述
-    type: '',
-    id: 0,
-  },
-  dialog: {
-    isShowDialog: false,
-    type: '',
-    title: '',
-    submitTxt: '',
-  },
-  btnLoading: false,
-})
-
-const state = reactive(initState());
-
-const _form = toRaw(state)
-
-// 打开弹窗
-const open = (action: string = 'add', row: any) => {
-  state.dialog.title = u.dialog.actions[action].title + "字典"
-  state.dialog.submitTxt = u.dialog.actions[action].btn + "字典"
-  state.dialog.isShowDialog = true;
-  if (action !== 'add') {
-    loadData(row.type);
-    state.ruleForm.type = row.type;
-    state.ruleForm.des = row.des;
-  }
-};
-// 关闭弹窗
-const closeDialog = () => {
-  state.dialog.isShowDialog = false;
-  console.log(JSON.stringify(_form))
-  Object.assign(state,initState())
-};
-// 取消
-const onCancel = () => {
-  closeDialog();
-};
-// 提交
-const onSubmit = () => {
-  console.log(JSON.stringify(state.ruleForm.list))
-  if (u.isEmptyOrNull(state.ruleForm.list)) {
-    Msg.message('字典内容不能为空', 'error');
-    return;
-  }
-
-  let checked = true;
-  state.ruleForm.list.forEach((item: any) => {
-    if (u.isEmptyOrNull(item.label)) {
-      Msg.message('字典内容不能为空', 'error');
-      checked = false;
-      return;
-    }
-    if (verifySpecialChar(item.label)) {
-      Msg.message('字典内容不能包含特殊字符', 'error');
-      checked = false;
-      return;
-    }
-    if (!item.value || item.value <= 0) {
-      Msg.message('字典码值不能为空', 'error');
-      checked = false;
-      return;
-    }
-  })
-  if (!checked) return;
-  const url = state.ruleForm.id > 0 ? "dict/modify" : "dict/add"
-  $body(url, state.ruleForm.list).then(() => {
-    state.btnLoading = false;
-    Msg.message('操作成功');
-    console.log('submit!')
-    closeDialog();
-    emit('refresh');
-  }).catch(() => {
-    state.btnLoading = false;
-    Msg.message('操作失败', 'error');
-  })
-
-
-  /*  formRef.value.validate((valid,fields)=>{
-      state.btnLoading = true;
-
-    }).catch(e => {
-      state.btnLoading = false;
-      Msg.message('请完整填写表单', 'error');
-    })*/
-};
-
-const handleFormChange = (formData: any) => {
-  console.log(formData)
-}
-
-// 初始化表格数据
-const loadData = (type: string) => {
-  $get(`dict/detail/${type}`).then((res: any) => {
-    state.ruleForm.list = res[type];
-    if (!u.isEmptyOrNull(res)) {
-      state.ruleForm.id = res[type][0].id;
-    }
-  })
-
-}
-
-const onAddRow = () => {
-  state.ruleForm.list.unshift({
-    type: state.ruleForm.type,
-    des: state.ruleForm.des
-  });
-}
-
-// 删除行
-const onDelRow = (k: number) => {
-  state.ruleForm.list.splice(k, 1);
-};
-
-const handleSetupDIctDes = (val:string)=>{
-  if (!u.isEmptyOrNull(state.ruleForm.list)) {
-    state.ruleForm.list.forEach(i=>i.des = val)
-  }
-}
-
-// 获取当前点击的 icon 图标
-const onGetIcon = (icon: string) => {
-  console.log(icon);
-};
-// 清空当前点击的 icon 图标
-const onClearIcon = (icon: string) => {
-  console.log(icon);
-};
-
-// 暴露变量
-defineExpose({
-  open,
-});
-</script>
-
-<style lang="scss" scoped>
-.dict-head {
-  :deep(.el-button) {
-    margin-top: 5px;
-  }
-}
-
-.recharge {
-  flex: 1;
-  padding: 20px;
-  text-align: center;
-  color: #fff;
-  border-top-right-radius: 100px;
-  border-bottom-right-radius: 100px;
-  /* 关键在这里,设置切线的角度和长度 */
-  background: linear-gradient(127deg, transparent 50px, rgb(247, 75, 33) 0);
-  /* 设置之后需要把位置向相反的方向偏移,达到粘合 */
-  margin-left: -50px;
-}
-
-</style>

+ 0 - 194
admin-web/src/views/admin/config/dict/index.vue

@@ -1,194 +0,0 @@
-<template>
-  <div class="system-container layout-padding">
-    <el-card shadow="hover" class="layout-padding-auto">
-      <ext-query-form
-          class="page-search"
-          ref="queryRef"
-          v-model="state.formQuery"
-          :columns="state.columns"
-          @on-change="loadData(true)">
-
-        <template #extraLeft>
-          <el-button size="default" type="success" @click="handleOpenDialog('add')">
-            <SvgIcon name="ele-FolderAdd"/>
-            创建
-          </el-button>
-        </template>
-      </ext-query-form>
-
-      <ext-table
-          class="page-content"
-          :data-list="state.tableData.data"
-          :columns="state.columns"
-          :border="true"
-          :loading="state.tableData.loading"
-          :height="state.tableData.height"
-          @on-row-dblclick="handleOpenDialog('view',$event)">
-      </ext-table>
-
-      <el-affix position="bottom" :offset="49">
-        <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
-      </el-affix>
-
-    </el-card>
-    <DictDialog ref="dicDialogRef" @refresh="loadData(true)"/>
-  </div>
-</template>
-
-<script setup lang="ts" name="systemDic">
-import {defineAsyncComponent, reactive, onMounted, ref,getCurrentInstance,nextTick} from 'vue';
-import ExtPage from "/@/components/form/ExtPage.vue"
-import ExtTable from "/@/components/form/ExtTable.vue"
-import {$body} from "/@/utils/request";
-import u from "/@/utils/u";
-import {Msg} from "/@/utils/message";
-// 引入组件
-const DictDialog = defineAsyncComponent(() => import('/@/views/admin/config/dict/dialog.vue'));
-
-const {proxy} :any= getCurrentInstance();
-import {ElButton} from 'element-plus'
-import ExtQueryForm from "/@/components/form/ExtQueryForm.vue";
-
-// 定义变量内容
-const queryRef = ref();
-const dicDialogRef = ref();
-
-const state = reactive({
-  tableData: {
-    data: [] as Array<any>,
-    total: 0,
-    loading: false,
-    height:500
-  },
-  pageQuery: {
-    pageNum: 1,
-    pageSize: 10,
-    total: 0
-  },
-  formQuery: {},
-  columns: [
-    {label: '类型', prop: 'type', query: true, type: 'text', resizable: true,width:150, },
-    {label: '描述', prop: 'des', query: true, type: 'text', resizable: true},
-    {
-      label: '创建时间', prop: 'createAt',width:180, query: true, type: 'datetime', resizable: true,
-      conf: {format: (val: any) => u.fmt.fmtDateTime(val)}
-    },
-    {
-      label: '更新时间', prop: 'updateAt', width:180,query: true, type: 'datetime', resizable: true,
-      conf: {format: (val: any) => u.fmt.fmtDateTime(val)}
-    },
-    {
-      label: '操作', prop: 'action', width: 180, type: 'render', align: 'center', fixed: 'right',
-      render: (h: any, row: any) => {
-        return (
-            h('div', [
-              h(ElButton, {
-                type: 'warning',
-                size: 'default',
-                text: true,
-                onClick: () => {
-                  handleOpenDialog('edit', row)
-                }
-              }, '编辑'),
-              h(ElButton, {
-                type: 'danger',
-                text: true,
-                onClick() {
-                  onRowDel(row)
-                }
-              }, '删除'),
-            ])
-        )
-
-      }
-    },
-  ]
-});
-
-const handleOpenDialog = (action: string, row: any) => {
- console.log(proxy.$auth('dict.add'));
-  console.log(action,row,dicDialogRef.value)
-  dicDialogRef.value.open(action, row);
-}
-
-// 初始化表格数据
-const loadData = (refresh: boolean = false) => {
-  if (refresh) {
-    state.pageQuery.pageNum = 1;
-  }
-  state.tableData.loading = true;
-  const data = [];
-  $body('dict/list', {...state.formQuery, ...state.pageQuery}).then((res: any) => {
-    let {list, count} = res;
-    let typeGroup = u.groupByKey(list, 'type');
-    let tableList = [] as Array<any>;
-    Object.keys(typeGroup).forEach(k => {
-      let dicts = typeGroup[k];
-      let {type, des, updateAt, createAt} = dicts[0];
-      tableList.push({
-        type,
-        des,
-        updateAt,
-        createAt,
-        dicts
-      });
-    })
-    state.tableData.data = tableList;
-    state.pageQuery.total = count;
-    state.tableData.loading = false;
-  })
-};
-/*// 打开新增字典弹窗
-const onOpenAddDic = (type: string) => {
-  console.log(type)
-  dicDialogRef.value.openDialog(type);
-};
-// 打开修改字典弹窗
-const onOpenEditDic = (type: string, row: RowDicType) => {
-  console.log(row)
-  dicDialogRef.value.openDialog(type, row);
-};*/
-// 删除字典
-const onRowDel = (row: RowDicType) => {
-  console.log(row)
-  Msg.confirm(`此操作将永久删除字典名称:“${row.type}”,是否继续?`).then(() => {
-    loadData();
-    Msg.message("删除成功")
-  })
-}
-
-// 页面加载时
-onMounted(() => {
-  loadData();
-
-  nextTick(() => {
-    let bodyHeight = document.body.clientHeight;
-    let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 320
-  })
-});
-</script>
-
-<style scoped lang="scss">
-.system-container {
-  :deep(.el-card__body) {
-    display: flex;
-    flex-direction: column;
-    flex: 1;
-    overflow: auto;
-
-    .el-table {
-      flex: 1;
-    }
-  }
-}
-
-.page-content {
-  margin-bottom: 20px;
-}
-
-.page-pager {
-  background-color: #fff;
-  height: 24px;
-}
-</style>

+ 0 - 127
admin-web/src/views/admin/config/list/dialog.vue

@@ -1,127 +0,0 @@
-<style scoped lang="scss">
-
-</style>
-<template>
-  <div class="system-dialog-container">
-    <el-dialog
-        :title="state.dialog.title"
-        v-model="state.dialog.isShowDialog"
-        width="820px"
-        draggable
-        destroy-on-close
-        :close-on-click-modal="false"
-        align-center>
-      <ext-detail-form
-          ref="formRef"
-          label-position="right"
-          v-model="state.ruleForm"
-          :columns="state.columns"
-          :rules="state.rules"
-          @on-change="handleFormChange"
-      ></ext-detail-form>
-
-      <template #footer>
-				<span class="dialog-footer">
-					<el-button @click="onCancel" size="default">取 消</el-button>
-					<el-button :loading="state.btnLoading" type="primary" @click="onSubmit" size="default">{{ state.dialog.submitTxt }}</el-button>
-				</span>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script setup lang="ts" name="ConfigDialog">
-import {defineAsyncComponent, reactive, onMounted, ref} from 'vue';
-import {Msg} from "/@/utils/message";
-import {$body, $get} from "/@/utils/request";
-import u from '/@/utils/u'
-
-// 引入组件
-
-// 定义子组件向父组件传值/事件
-const emit = defineEmits(['refresh']);
-const formRef = ref();
-//定义初始变量,重置使用
-const initState = ()=>({
-  ruleForm: {
-    id:0
-  },
-  btnLoading: false,
-  dialog: {
-    isShowDialog: false,
-    type: '',
-    title: '',
-    submitTxt: '',
-  },
-  columns: [
-    {label: '字段', prop: 'code', type: 'text',readonly:true},
-    {
-      label: '状态',
-      prop: 'status',
-      type: 'dict',
-      conf: {dict: 'Common.status'}
-    },
-    {label: '值', prop: 'value', type: 'textarea',},
-    {label: '描述', prop: 'remark', type: 'textarea',},
-  ],
-  rules: {},
-})
-
-// 定义变量内容
-const state = reactive(initState());
-
-
-// 打开弹窗
-const open = (action: string='add', row: any) => {
-  state.dialog.title = u.dialog.actions[action].title +"『应用配置』"
-  state.dialog.submitTxt = u.dialog.actions[action].btn +"『应用配置』"
-  state.dialog.isShowDialog = true;
-  if (action !=='add') {
-    loadData(row.id);
-  }
-};
-// 关闭弹窗
-const onClose = () => {
-  state.dialog.isShowDialog = false;
-  Object.assign(state,initState())
-};
-// 取消
-const onCancel = () => {
-  onClose();
-};
-// 提交
-const onSubmit = () => {
-  formRef.value.checkForm().then(() => {
-    state.btnLoading = true;
-    const url = state.ruleForm.id > 0 ? "config/modify" : "config/add"
-    $body(url, state.ruleForm).then(() => {
-      state.btnLoading = false;
-      Msg.message('操作成功');
-      console.log('submit!')
-      onClose();
-      emit('refresh');
-    })
-  }).catch(() => {
-    state.btnLoading = false;
-    Msg.message('请完整填写表单', 'error');
-  })
-};
-
-const handleFormChange = (formData: any) => {
-  console.log(formData)
-}
-
-// 初始化表格数据
-const loadData = (id: number) => {
-  $get(`config/detail/${id}`).then((res: any) => {
-    state.ruleForm = res;
-  })
-}
-
-// 暴露变量
-defineExpose({
-  open
-});
-
-
-</script>

+ 0 - 208
admin-web/src/views/admin/config/list/index.vue

@@ -1,208 +0,0 @@
-<style scoped lang="scss">
-.system-container {
-
-  :deep(.el-card__body) {
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    flex: 1;
-    overflow: auto;
-
-    .el-table {
-      flex: 1;
-    }
-
-  }
-}
-
-.page-content {
-  margin-bottom: 20px;
-}
-
-.page-pager {
-  background-color: #fff;
-  height: 24px;
-}
-</style>
-<template>
-  <div class="system-container layout-padding">
-    <el-card shadow="hover" class="layout-padding-auto">
-      <ext-query-form
-          class="page-search"
-          ref="queryRef"
-          v-model="state.formQuery"
-          :columns="state.columns"
-          :import-config="state.importConfig"
-          :export-config="state.exportConfig"
-          @on-change="loadData(true)"
-          @imported="loadData(true)">
-        <!--  <template #extraQuery></template>
-          <template #extraLeft></template>
-          <template #extraRight></template>-->
-      </ext-query-form>
-
-      <ext-table
-          class="page-content"
-          :height="state.tableData.height"
-          :data-list="state.tableData.data"
-          :columns="state.columns"
-          :border="true"
-          :loading="state.tableData.loading">
-      </ext-table>
-
-      <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
-    </el-card>
-  </div>
-  <ConfigDialog ref="configDialogRef" @refresh="loadData(true)"/>
-</template>
-
-<script setup lang="ts" name="ConfigList">
-import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
-import {$body, $get} from "/@/utils/request";
-import u from '/@/utils/u'
-import {Msg} from "/@/utils/message";
-import {Session} from "/@/utils/storage";
-
-const {proxy}: any = getCurrentInstance();
-
-import ExtPage from '/@/components/form/ExtPage.vue'
-import ExtQueryForm from "/@/components/form/ExtQueryForm.vue";
-import ExtTable from "/@/components/form/ExtTable.vue";
-
-import mittBus from '/@/utils/mitt';
-
-import {ElButton} from 'element-plus'
-
-
-const ConfigDialog = defineAsyncComponent(() => import("/@/views/admin/config/list/dialog.vue"));
-
-//定义引用
-const queryRef = ref();
-const configDialogRef = ref();
-
-//定义变量
-const state = reactive({
-  formQuery: {},
-  pageQuery: {
-    pageNum: 1,
-    pageSize: 10,
-    total: 0
-  },
-  tableData: {
-    height: 500,
-    data: [] as Array<any>,
-    loading: false
-  },
-  importConfig: {},
-  exportConfig: {},
-  columns: [
-    {label: '字段', prop: 'code', query: true, type: 'text', resizable: true},
-    {label: '值', prop: 'value', query: true, type: 'text', resizable: true},
-    {label: '状态', prop: 'status', sortable: 'custom', align: 'center', query: true, type: 'dict', conf: {dict: 'Common.status'}},
-    {label: '描述', prop: 'remark', query: true, type: 'text', resizable: true},
-    {label: '更新时间', prop: 'updateAt', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {
-      label: '操作', prop: 'action', type: 'render', width: 180, align: 'center', fixed: 'right',
-      render: (h: any, row: any) => {
-        return (
-            h('div', null, [
-              proxy.$auth('config.modify') ?
-                  h(ElButton, {
-                    type: 'warning',
-                    text: true,
-                    size: 'small',
-                    onClick: () => {
-                      onRowClick('edit', row)
-                    }
-                  }, () => '编辑') : '',
-              proxy.$auth('config.remove') ?
-                  h(ElButton, {
-                    type: 'danger',
-                    text: true,
-                    size: 'small',
-                    onClick: () => {
-                      console.error("delxxxx", row)
-                      onRowDel(row)
-                    }
-                  }, () => '删除') : '',
-            ])
-        )
-      }
-    }
-  ],
-})
-
-
-// 监听双向绑定 modelValue 的变化
-// watch(
-//         () => state.pageNum,
-//         () => {
-//
-//         }
-// );
-
-//生命周期钩子
-onBeforeMount(() => {
-
-})
-
-onMounted(() => {
-  loadData();
-
-  nextTick(() => {
-    let bodyHeight = document.body.clientHeight;
-    let queryHeight = queryRef.value.$el.clientHeight;
-    state.tableData.height = bodyHeight - queryHeight - 320
-  })
-
-  mittBus.on("config.refresh", () => {
-    loadData();
-  })
-});
-
-onBeforeUnmount(() => {
-  mittBus.off("config.refresh")
-})
-
-
-//region 方法区
-// 初始化表格数据
-const loadData = (refresh: boolean = false) => {
-  if (refresh) {
-    state.pageQuery.pageNum = 1;
-  }
-  state.tableData.loading = true;
-  $body(`/config/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
-    let {list, count} = res;
-    state.tableData.data = list;
-    state.pageQuery.total = count;
-    state.tableData.loading = false;
-  }).catch(e => {
-    console.error(e)
-    state.tableData.loading = false;
-  })
-};
-
-// 打开修改用户弹窗
-const onRowClick = (type: string, row: any) => {
-  configDialogRef.value.open(type, row);
-};
-// 删除用户
-const onRowDel = (row: any) => {
-  Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
-    $get(`/config/delete/${row.id}`).then(() => {
-      Msg.message("删除成功", 'success')
-    }).catch(() => {
-      Msg.message("删除失败", 'error')
-    })
-  });
-};
-
-//endregion
-
-
-// 暴露变量
-// defineExpose({
-//     loadData,
-// });
-</script>

+ 7 - 7
admin-web/src/views/admin/department/dialog.vue

@@ -129,11 +129,11 @@ const initState = () => ({
 const state = reactive(initState());
 
 onDeactivated(() => {
-  console.log("onDeactivated")
+  //console.log("onDeactivated")
   deptDialogFormRef.value?.resetFields();
 })
 onBeforeUnmount(() => {
-  console.log("onBeforeUnmount")
+  //console.log("onBeforeUnmount")
   deptDialogFormRef.value?.resetFields();
 })
 // 打开弹窗
@@ -171,7 +171,7 @@ const openDialog = (id: number, readonly: boolean, row: any) => {
 // 关闭弹窗
 const closeDialog = () => {
   state.dialog.isShowDialog = false;
-  console.log("closeDialog")
+  //console.log("closeDialog")
 
   nextTick(() => {
 
@@ -196,21 +196,21 @@ const onSubmit = (formEl: FormInstance | undefined) => {
     closeDialog();
     return;
   }
-  console.log(state.ruleForm)
+  //console.log(state.ruleForm)
   if (!formEl) return
   formEl.validate((valid, fields) => {
-    console.log(fields)
+    //console.log(fields)
     if (valid) {
       const url = state.ruleForm.id > 0 ? "department/modify" : "department/add"
       $body(url, state.ruleForm).then(() => {
         ElMessage.success('修改成功');
-        console.log('submit!')
+        //console.log('submit!')
         closeDialog();
         emit('refresh');
       })
 
     } else {
-      console.log('error submit!', fields)
+      //console.log('error submit!', fields)
     }
   })
 }

+ 1 - 1
admin-web/src/views/admin/department/index.vue

@@ -159,7 +159,7 @@ const loadListData = () => {
 }
 
 const handleNodeClick = (data: any) => {
-  console.log(data)
+  //console.log(data)
   if (data) {
     if (state.formQuery.parent === data.id) {
       state.formQuery.parent = null;

+ 27 - 21
admin-web/src/views/admin/dict/index.vue

@@ -99,28 +99,28 @@
           <div v-for="(item,idx) in state.dictForm.list" :key="idx" class="mt10">
             <el-row :gutter="10">
               <el-col :span="8">
-                <el-input size="default" v-model="item.name" placeholder="字典名称" @change="state.saveVisible = true;"></el-input>
+                <el-input size="default" v-model="item.name" placeholder="显示名称" @change="state.saveVisible = true;"></el-input>
               </el-col>
               <el-col :span="8">
-                <el-input size="default" :readonly="item.id" v-model="item.value" placeholder="字典码值"></el-input>
+                <el-input size="default" :readonly="item.id" v-model="item.value" placeholder="数据码值"></el-input>
               </el-col>
               <el-col :span="8">
-                <el-input-number :min="1"  size="default" controls-position="right" v-model="item.weight" placeholder="排序权重"></el-input-number>
+                <el-input-number :min="1" size="default" controls-position="right" v-model="item.weight" placeholder="排序权重"></el-input-number>
                 <SvgIcon name="ele-RemoveFilled" color="var(--el-color-danger)" class="ml3 cursor-pointer" @click="handleDeleteDictItem(idx)"></SvgIcon>
               </el-col>
             </el-row>
           </div>
 
-          <el-button  v-auth="'dict.add'" size="small" class="mt10 mr5" type="primary" @click="handleAddDictItem">新增</el-button>
+          <el-button v-auth="'dict.add'" size="small" class="mt10 mr5" type="primary" @click="handleAddDictItem">新增</el-button>
           <el-button v-auth="'dict.modify'" size="small" class="mt10" type="success" v-if="state.saveVisible" @click="handleSaveDict">保存</el-button>
 
         </div>
       </div>
 
 
-<!--      <el-affix position="bottom" :offset="49">
-        <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
-      </el-affix>-->
+      <!--      <el-affix position="bottom" :offset="49">
+              <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
+            </el-affix>-->
 
     </el-card>
   </div>
@@ -162,16 +162,16 @@ const state = reactive({
     }
   ],
   dictForm: {
-    visible:false,
+    visible: false,
     id: 0,
     code: '',
     remark: '',
     list: [] as Array<any>
-  },
+  } as any,
   dictLoading: false,
-  visible:false,
-  saveVisible:false,
-  dictList:[] as any[]
+  visible: false,
+  saveVisible: false,
+  dictList: [] as any[]
 });
 
 
@@ -183,23 +183,23 @@ const loadData = (refresh: boolean = false) => {
   state.tableData.loading = true;
   $body('dataDict/list', state.formQuery).then((res: any) => {
     state.dictList = res;
-    state.tableData.data = u.distinctByKey(res,"code");
+    state.tableData.data = u.distinctByKey(res, "code");
     state.tableData.loading = false;
   })
 };
 /*// 打开新增字典弹窗
 const onOpenAddDic = (type: string) => {
-  console.log(type)
+  //console.log(type)
   dicDialogRef.value.openDialog(type);
 };
 // 打开修改字典弹窗
 const onOpenEditDic = (type: string, row: RowDicType) => {
-  console.log(row)
+  //console.log(row)
   dicDialogRef.value.openDialog(type, row);
 };*/
 // 删除字典
 const onRowDel = (row: RowDicType) => {
-  console.log(row)
+  //console.log(row)
   Msg.confirm(`此操作将永久删除字典名称:“${row.type}”,是否继续?`).then(() => {
     loadData();
     Msg.message("删除成功")
@@ -219,10 +219,10 @@ onMounted(() => {
 
 const handleDictRowClick = (row: any) => {
   state.dictLoading = true;
-  let list = state.dictList.filter(k=>k.code===row.code);
+  let list = state.dictList.filter(k => k.code === row.code);
   if (u.isEmptyOrNull(list)) {
     state.dictForm = {
-      id:0,
+      id: 0,
       code: '',
       remark: '',
       list: []
@@ -242,7 +242,7 @@ const handleDictRowClick = (row: any) => {
 
 const handleDeleteDictItem = (idx) => {
   state.saveVisible = true;
-  state.dictForm.list.splice(idx,1)
+  state.dictForm.list.splice(idx, 1)
 }
 
 const handleAddDict = () => {
@@ -271,10 +271,10 @@ const handleAddDictItem = () => {
 const handleSaveDict = () => {
   let params = state.dictForm.list.map(k => {
     let {id, name, value, weight} = k;
-    if(!name){
+    if (!name) {
       throw Error("字典项名称不能为空");
     }
-    if(!value){
+    if (!value) {
       throw Error("字典项码值不能为空");
     }
     return {
@@ -286,6 +286,12 @@ const handleSaveDict = () => {
   $body(`dataDict/saveOrUpdate`, params).then(() => {
     Msg.message("保存成功")
     state.saveVisible = false;
+    state.dictForm = {
+      id: 0,
+      code: '',
+      remark: '',
+      list: [] as Array<any>
+    }
   })
 }
 </script>

+ 10 - 5
admin-web/src/views/admin/faq/dialog.vue

@@ -30,7 +30,7 @@
         </el-form-item>
 
         <el-form-item label="答案" prop="answer"   class="w100">
-          <ext-editor v-model="state.ruleForm.answer"></ext-editor>
+          <ext-editor ref="faq_editor_ref" v-model="state.ruleForm.answer"></ext-editor>
         </el-form-item>
 
       </el-form>
@@ -46,7 +46,7 @@
 </template>
 
 <script setup lang="ts" name="FaqDialog">
-import {defineAsyncComponent, reactive, onMounted, ref} from 'vue';
+import {nextTick, reactive, onMounted, ref} from 'vue';
 import {Msg} from "/@/utils/message";
 import {$body, $get} from "/@/utils/request";
 import u from '/@/utils/u'
@@ -60,6 +60,7 @@ import ExtEditor from "/@/components/form/ExtEditor.vue";
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['refresh']);
 const formRef = ref();
+const faq_editor_ref = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
@@ -114,7 +115,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -126,13 +127,17 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据
 const loadData = (id: number) => {
-  $get(`faq/${id}`).then((res: any) => {
+  $get(`faq/detail/${id}`).then((res: any) => {
     state.ruleForm = res;
+    nextTick(()=>{
+
+    faq_editor_ref.value?.initText(res.answer);
+    })
   })
 }
 

+ 24 - 12
admin-web/src/views/admin/faq/index.vue

@@ -55,7 +55,7 @@
           查询
         </el-button>
 
-        <el-button  v-auth="'faq.add'"   size="default" plain  type="success" class="ml10" @click="onRowClick('add',null)">
+        <el-button  v-auth="'faq.add'"   size="default" plain  type="success" class="ml10" @click="handleRowClick('add',null)">
           <SvgIcon name="ele-FolderAdd"/>
           新增
         </el-button>
@@ -84,12 +84,23 @@
             :min-width="field.minWidth"
             :fixed="field.fixed"
             :sortable="field.sortable"
-            :show-overflow-tooltip="!field.fixed&&field.width>150"
-        >
+            :show-overflow-tooltip="!field.fixed&&field.width>150" >
+
           <template #default="{row}">
             <template v-if="field.prop==='expand'">
               <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
             </template>
+            <template v-else-if="field.prop==='status'">
+              <ext-d-label type="User.status" :model-value="row[field.prop]"></ext-d-label>
+<!--              <p style="padding-left: 2em;" v-html="row[field.prop]"></p>-->
+            </template>
+<!--            <template v-else-if="field.prop==='answer'">
+              <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
+            </template>-->
+            <template v-else-if="field.prop==='action'">
+              <el-button  v-auth="'faq.modify'" size="small" plain type="warning" @click="handleRowClick('edit',row)">编辑</el-button>
+              <el-button  v-auth="'faq.remove'" size="small" plain type="danger" @click="handleRowDelete(row)">删除</el-button>
+            </template>
             <template v-else>
               <div>{{ row[field.prop] }}</div>
             </template>
@@ -106,7 +117,7 @@
 
 <script setup lang="ts" name="FaqList">
 import {nextTick, onBeforeMount, onBeforeUnmount, onMounted, reactive, ref} from 'vue';
-import {$get} from "/@/utils/request";
+import {$get,$body} from "/@/utils/request";
 import {Msg} from "/@/utils/message";
 import u from "/@/utils/u"
 
@@ -115,6 +126,7 @@ import ExtPage from '/@/components/form/ExtPage.vue'
 import FaqDialog from "/@/views/admin/faq/dialog.vue"
 
 import mittBus from '/@/utils/mitt';
+import ExtDLabel from "/@/components/form/ExtDLabel.vue";
 
 const route = useRoute();
 
@@ -139,7 +151,7 @@ const state = reactive({
       {label: '问题', prop: 'question', width: 200, resizable: true, fixed: 'left'},
       {label: '状态', prop: 'status', width: 150, resizable: true, fixed: 'left'},
       {label: '答案', prop: 'answer', resizable: true},
-      {label: '操作', prop: 'transactionTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
+      {label: '操作', prop: 'action', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
     ],
   },
 })
@@ -159,7 +171,7 @@ onBeforeMount(() => {
 
 onMounted(() => {
   var query = route.query;
-  console.log(route.params, route.query)
+  //console.log(route.params, route.query)
   if (query.mobilePhone) {
     state.formQuery.mobilePhone = query.mobilePhone;
   }
@@ -183,22 +195,22 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
-  $get(`/faq/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
+  $body(`/faq/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
     let {list, total} = res;
     state.tableData.data = list;
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
 
-const onRowClick = (type: string, row: any) => {
+const handleRowClick = (type: string, row: any) => {
   faq_dialog_ref.value.open(type, row);
 };
 
-const onRowDel = (row: any) => {
+const handleRowDelete = (row: any) => {
   Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
     $get(`/faq/delete/${row.id}`).then(() => {
       Msg.message("删除成功", 'success')
@@ -209,12 +221,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 2 - 2
admin-web/src/views/admin/feedback/dialog.vue

@@ -170,7 +170,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -182,7 +182,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化数据

+ 6 - 6
admin-web/src/views/admin/feedback/index.vue

@@ -84,7 +84,7 @@ const feedbackDialogRef = ref();
 const state = reactive({
   formQuery: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
@@ -115,7 +115,7 @@ const state = reactive({
             onClick: () => {
               onRowClick('view', row)
             }
-          }, row.name||row.title)])
+          }, row)])
       }
     },
     {label: '纠错类型', prop: 'type', query: true, type: '', resizable: true},
@@ -139,7 +139,7 @@ const state = reactive({
                     text: true,
                     size: 'small',
                     onClick: () => {
-                      console.error("delxxxx", row)
+                      //console.error("delxxxx", row)
                       onRowDel(row)
                     }
                   }, () => '删除') : '',
@@ -153,7 +153,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -198,7 +198,7 @@ onBeforeUnmount(()=>{
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/feedback/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
@@ -207,7 +207,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = count;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };

+ 4 - 4
admin-web/src/views/admin/finance/index.vue

@@ -180,7 +180,7 @@ onBeforeMount(() => {
 
 onMounted(() => {
   var query = route.query;
-  console.log(route.params, route.query)
+  //console.log(route.params, route.query)
   if (query.mobilePhone) {
     state.formQuery.mobilePhone = query.mobilePhone;
   }
@@ -216,7 +216,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -238,12 +238,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 4 - 4
admin-web/src/views/admin/index.vue

@@ -425,7 +425,7 @@ const initEchartsResize = () => {
 
 const loadCurrentEquipmentStatus = () => {
   $get(`connector/statConnectorStatus`, {stationId: state.currentStationId}).then((res: any) => {
-    console.log(res)
+    //console.log(res)
     initPieChart(res || {});
   })
 }
@@ -442,7 +442,7 @@ const loadStationStat = () => {
     pageSize: size,
     stationId: state.currentStationId
   }).then((res: any) => {
-    console.log(res)
+    //console.log(res)
     state.homeOneExtra = res.extraData
     initLineChart(res.list);
   })
@@ -450,7 +450,7 @@ const loadStationStat = () => {
 
 const loadStationStatToday = () => {
   $get(`stat/stationTodayStat`, {stationId: state.currentStationId}).then((res: any) => {
-    console.log(res)
+    //console.log(res)
     if (!u.isEmptyOrNull(res)) {
       let {chargeUsers, totalOrders, totalPower, totalMoney, elecMoney, payServiceAmount} = res
       state.homeOne[0].num1 = totalPower;
@@ -469,7 +469,7 @@ onMounted(() => {
   if (currentStationId) {
     state.currentStationId = currentStationId;
   }
-  console.error("home onMounted")
+  //console.error("home onMounted")
   NProgress.done();
   initEchartsResize();
   //加载洗车走势数据

+ 3 - 3
admin-web/src/views/admin/investor/dialog.vue

@@ -230,14 +230,14 @@ const onCancel = () => {
 // 提交
 const onSubmit = () => {
   formRef.value.validate((valid, fields) => {
-    // console.log('basic checkForm!', valid,fields)
+    // //console.log('basic checkForm!', valid,fields)
     if (valid) {
       state.btnLoading = true;
       const url = state.ruleForm.id ? "investorInfo/update" : "investorInfo/create"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -250,7 +250,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据

+ 3 - 3
admin-web/src/views/admin/investor/index.vue

@@ -234,7 +234,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -256,12 +256,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 4 - 4
admin-web/src/views/admin/invoice/dialog.vue

@@ -307,7 +307,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -319,7 +319,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据
@@ -327,8 +327,8 @@ const loadData = (applyId: String) => {
   $get(`finance/listInvoiceDetail`, {applyId}).then((res: any) => {
     if (res.list && res.list.length > 0) {
       state.ruleForm = res.list[0];
-      console.log(state.ruleForm)
-      console.log(state.detail)
+      //console.log(state.ruleForm)
+      //console.log(state.detail)
     }
   })
 }

+ 7 - 7
admin-web/src/views/admin/invoice/index.vue

@@ -314,7 +314,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -325,7 +325,7 @@ const handleInvice = (row: any) => {
       Msg.message("开票成功")
       loadData(true)
     }).catch(e => {
-      console.error(e)
+      //console.error(e)
     })
   })
 
@@ -349,7 +349,7 @@ const handleInfo = (row:any) => {
 
 const previewInvoice =   (row: any) => {
   $get(`/finance/downloadInvoice/${row.id}`).then((res: any) => {
-    console.log(res)
+    //console.log(res)
     let {downloadUrl} = res;
     if (downloadUrl) {
       window.open(downloadUrl, "_blank")
@@ -358,7 +358,7 @@ const previewInvoice =   (row: any) => {
 
     }
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
   })
 }
 /*
@@ -384,12 +384,12 @@ const onRowClick = (type: string, row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 
@@ -399,7 +399,7 @@ const handleCancelInvoice = (row:any) => {
       Msg.message("取消成功")
       loadData(true)
     }).catch(e => {
-      console.error(e)
+      //console.error(e)
     })
   })
 

+ 8 - 8
admin-web/src/views/admin/kanban/index.vue

@@ -206,7 +206,7 @@ window.onresize = function () {
 //region 方法区
 
 const handleQueryTypeChange = (type: string) => {
-  console.log(type)
+  //console.log(type)
   if (type === 'day') {
     state.dateType = 'daterange'
     state.dateFormat = 'YYYY-MM-DD'
@@ -220,18 +220,18 @@ const loadStationList = () => {
   $get(`/station/listStation`, {pageNum: 1024}).then((res: any) => {
     state.stationList = res;
     state.formQuery.stationIdList = res.map(k=>k.stationId);
-    console.log(res)
+    //console.log(res)
     setTimeout(()=>{
       loadData();
     },200)
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
   })
 }
 
 // 初始化表格数据
 const loadData = () => {
-  console.log(state.formQuery)
+  //console.log(state.formQuery)
   let params = {
     stationIds: state.formQuery.stationIdList,
     startTime: state.formQuery.dateRange[0],
@@ -244,7 +244,7 @@ const loadData = () => {
     }
   }
   $get(`/stat/stationStatDetail`, params).then(res => {
-    console.log(res)
+    //console.log(res)
     state.chartData = res;
     buildOrderChart()
     buildMoneyChart()
@@ -412,7 +412,7 @@ const buildOrderChart = () => {
     series: series
   };
 
-  console.log(option)
+  //console.log(option)
   state.chartOne.setOption(option)
 }
 
@@ -551,7 +551,7 @@ const buildElectricChart = () => {
     ],
     series: series
   };
-  // console.log(option)
+  // //console.log(option)
   state.chartThree.setOption(option)
 
 
@@ -693,7 +693,7 @@ const buildMoneyChart = () => {
     ],
     series: series
   };
-  // console.log(option)
+  // //console.log(option)
   state.chartTwo.setOption(option)
 
 }

+ 1 - 1
admin-web/src/views/admin/log/error/index.vue

@@ -66,7 +66,7 @@ const loadData = (refresh: boolean = false) => {
     state.tableData.loading = false;
     state.pageQuery.total = count;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };

+ 2 - 2
admin-web/src/views/admin/ordering/dialog.vue

@@ -363,7 +363,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -375,7 +375,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化数据

+ 193 - 84
admin-web/src/views/admin/ordering/index.vue

@@ -23,6 +23,9 @@
   background-color: #fff;
   height: 24px;
 }
+.order-detail{
+  margin-left: 20px;
+}
 </style>
 <template>
   <div class="system-container layout-padding">
@@ -41,24 +44,91 @@
           <template #extraRight></template>-->
       </ext-query-form>
 
-      <ext-table
-          class="page-content"
+      <el-table
+          border
+          stripe="stripe"
           :height="state.tableData.height"
-          :data-list="state.tableData.data"
-          :columns="state.columns"
-          :border="true"
-          :loading="state.tableData.loading">
-      </ext-table>
+          highlight-current-row
+          current-row-key="id"
+          row-key="id"
+          @on-row-click="handleRowClick('view',$event)"
+          :data="state.tableData.data"
+          v-loading="state.tableData.loading">
+        <template #empty>
+          <el-empty></el-empty>
+        </template>
+        <el-table-column
+            v-for="field in state.columns"
+            :key="field.prop"
+            :type="field.type"
+            :label="field.label"
+            :column-key="field.prop"
+            :width="field.width"
+            :min-width="field.minWidth"
+            :fixed="field.fixed"
+            :sortable="field.sortable"
+            :show-overflow-tooltip="!field.fixed&&field.width>150">
+
+          <template #default="{row}">
+            <template v-if="field.type==='expand'">
+              <div class="order-detail">
+                <el-table
+                    border
+                    :data="row.detail"
+                    stripe="stripe">
+                  <el-table-column width="120" label="项目" prop="name"></el-table-column>
+                  <el-table-column width="120" label="时长" prop="seconds"></el-table-column>
+                  <el-table-column width="120" label="单价" prop="price"></el-table-column>
+                  <el-table-column width="120" label="费用" prop="amount"></el-table-column>
+                </el-table>
+              </div>
+            </template>
+            <template v-else-if="field.prop==='discountType'">
+              <ext-d-label type="Activity.discountType" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="field.prop==='cardType'">
+              <ext-d-label type="OrderCard.type" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="field.prop==='invoiceStatus'">
+              <ext-d-label type="Invoice.status" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="field.prop==='openType'">
+              <ext-d-label type="Order.openType" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="field.prop==='orderStatus'">
+              <ext-d-label type="Order.status" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="field.prop==='payStatus'">
+              <ext-d-label type="Order.pay" :model-value="row[field.prop]"></ext-d-label>
+            </template>
+            <template v-else-if="['prepayMoney','amount','amountReceivable','amountReceived','cardBalance','coinMoney','discountAmount','discountMoney'].includes(field.prop)">
+              {{ u.fmt.fmtMoney(row[row.prop]) }}
+            </template>
+            <template v-else-if="field.prop==='idleRemainTime'||field.prop==='operationRemainTime'">
+              {{ u.fmt.fmtDuration(row[field.prop]) }}
+            </template>
+            <template v-else-if="field.prop==='createTime'">
+              {{ u.fmt.fmtDateTime(row[field.prop]) }}
+            </template>
+            <template v-else-if="field.prop==='updateTime'">
+              {{ u.fmt.fmtDateTime(row[field.prop]) }}
+            </template>
+            <template v-else>
+              <div>{{ row[field.prop] }}</div>
+            </template>
+
+          </template>
+        </el-table-column>
+      </el-table>
 
       <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
     </el-card>
   </div>
-  <WashOrderDialog ref="washOrderDialogRef" @refresh="loadData(true)"/>
 </template>
 
 <script setup lang="ts" name="WashOrderList">
-import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance,nextTick,onBeforeUnmount} from 'vue';
-import {$body,$get} from "/@/utils/request";
+import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
+import {$body, $get} from "/@/utils/request";
 import u from '/@/utils/u'
 import {Msg} from "/@/utils/message";
 import {Session} from "/@/utils/storage";
@@ -67,11 +137,10 @@ const {proxy}: any = getCurrentInstance();
 
 import ExtPage from '/@/components/form/ExtPage.vue'
 import ExtQueryForm from "/@/components/form/ExtQueryForm.vue";
-import ExtTable from "/@/components/form/ExtTable.vue";
 
 import mittBus from '/@/utils/mitt';
 
-import {ElButton} from 'element-plus'
+import ExtDLabel from "/@/components/form/ExtDLabel.vue";
 
 
 const WashOrderDialog = defineAsyncComponent(() => import("/@/views/admin/ordering/dialog.vue"));
@@ -84,87 +153,110 @@ const washOrderDialogRef = ref();
 const state = reactive({
   formQuery: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
   tableData: {
-    height:500,
-    data: [] as Array < any >,
+    height: 500,
+    data: [] as Array<any>,
     loading: false
   },
   importConfig: {},
   exportConfig: {},
   columns: [
-    {type: 'selection', width: 60, align: 'center', fixed: 'left'},
-    {label: '消费总额,等于各单项费用之和(单位分)', prop: 'amount', query: true, type: '', resizable: true},
-    {label: '应收金额,如果大于预付金额,则限制为预付金额并关机,否则等于消费总金额(单位分)', prop: 'amountReceivable', query: true, type: '', resizable: true},
-    {label: '实收金额等于应收金额乘会员折扣(单位分)', prop: 'amountReceived', query: true, type: '', resizable: true},
-    {label: '卡内余额(仅限刷储值卡的订单有效,普通卡为总是为0)', prop: 'cardBalance', query: true, type: '', resizable: true},
-    {label: '卡过期时间,从1970年开始的时间戳(仅限刷储值卡的订单有效,普通卡为总是为0)', prop: 'cardExpired', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '卡内码,卡出厂的时候厂家写入的ID(仅限刷卡订单)', prop: 'cardId', query: true, type: 'text', resizable: true},
-    {label: '卡串号,印刷在卡的表面,通过电脑上的卡管理工具写入卡内。(仅限刷卡订单)', prop: 'cardSn', query: true, type: 'text', resizable: true},
-    {label: '卡类型(仅限刷卡订单,1表示普通卡,2表示储值卡)', prop: 'cardType', query: true, type: '', resizable: true},
-    {label: '关机方式:button维护按钮,network网络命令,no_balance超过预设金额,idle_timeout设备空闲超时,operation_timeout操作超时,card刷卡。注意:为空表示还没有关机,正在使用', prop: 'closeType', query: true, type: 'text', resizable: true},
-    {label: '投币的累计金额(仅限刷卡订单,单位分)', prop: 'coinMoney', query: true, type: '', resizable: true},
-    {label: '投币的次数仅限刷卡订单', prop: 'coinNum', query: true, type: '', resizable: true},
-    {label: '', prop: 'createTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '费用明细:name 名称 price 单价(单位分) seconds 时长(单位秒) amount 费用(单位分) space⻋位或场地,water清水,foam泡沫,cleaner吸尘,tap水龙头,user_ext用户扩展,消毒或吹干等功能,coat镀膜,blow吹气', prop: 'detail', query: true, type: 'text', resizable: true},
-    {label: '设备名称', prop: 'deviceName', query: true, type: 'text', resizable: true},
-    {label: '优惠金额(分)', prop: 'discountAmount', query: true, type: '', resizable: true},
-    {label: '优惠金额等于消费总额减去实收金额(单位分)', prop: 'discountMoney', query: true, type: '', resizable: true},
-    {label: '优惠方式:RechargeRights-充值权益 Coupon-优惠券', prop: 'discountType', query: true, type: 'text', resizable: true},
-    {label: '结束时间', prop: 'endTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '设备空闲关机倒计时剩余时间(单位秒),开机后从idle_timeout开始每秒减1,见到0关机,关机原因close_type=idle_time(递减过程中按任意功能键,重新开始从idle_timeout递减)', prop: 'idleRemainTime', query: true, type: '', resizable: true},
-    {label: '发票状态:0-待开票 1-已开票 2-已作废(用不上) 3-开票中', prop: 'invoiceStatus', query: true, type: '', resizable: true},
-    {label: '会员折扣比例(0-100,100表示不享受折扣,95表示9.5折优惠)', prop: 'memberDiscount', query: true, type: '', resizable: true},
-    {label: '开机方式:button维护按钮,network网络命令,coin投币,card刷卡', prop: 'openType', query: true, type: 'text', resizable: true},
-    {label: '订单操作剩余操作时间(单位秒),开机后从operation_timeout开始每秒减1,减到0关机,关机原因close_type=operation_timeout', prop: 'operationRemainTime', query: true, type: '', resizable: true},
-    {label: '订单号,和开机命令的order_id相同,如果使用按钮快速开机,order_id是空字符串', prop: 'orderId', query: true, type: 'text', resizable: true},
-    {label: '本机订单号', prop: 'orderIdLocal', query: true, type: 'text', resizable: true},
-    {label: '订单状态:-1:未知,0-开机,1:成功,2:失败,3:取消', prop: 'orderStatus', query: true, type: '', resizable: true},
-    {label: '支付状态:0:未支付,1:已支付', prop: 'payStatus', query: true, type: '', resizable: true},
-    {label: '本次开机的预付金额(单位分,本次开机最大消费金额限制)', prop: 'prepayMoney', query: true, type: '', resizable: true},
-    {label: '产品key', prop: 'productKey', query: true, type: 'text', resizable: true},
-    {label: '开始时间', prop: 'startTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '', prop: 'stationId', query: true, type: 'text', resizable: true},
-    {label: '', prop: 'stopReason', query: true, type: 'text', resizable: true},
-    {label: '', prop: 'updateTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {                label: '操作', prop: 'action', type: 'render', width: 180, align: 'center', fixed: 'right',
-      render: (h: any, row: any) => {
-        return (
-            h('div', null, [
-              proxy.$auth('washOrder.modify') ?
-                  h(ElButton, {
-                    type: 'warning',
-                    text: true,
-                    size: 'small',
-                    onClick: () => {
-                      handleRowClick('edit', row)
-                    }
-                  }, () => '编辑') : '',
-              proxy.$auth('washOrder.remove') ?
-                  h(ElButton, {
-                    type: 'danger',
-                    text: true,
-                    size: 'small',
-                    onClick: () => {
-                      handleRowDelete(row)
-                    }
-                  }, () => '删除') : '',
-            ])
-        )
-      }
-    }
+    {type: 'expand', width: 60, align: 'center', fixed: 'left'},
+    {width: 260, label: '订单号', prop: 'orderId', query: true, type: 'text', resizable: true, fixed: 'left'},
+    {width: 160, label: '消费总额', prop: 'amount', query: false, resizable: true, fixed: 'left'},
+    {width: 160, label: '应收金额', prop: 'amountReceivable', query: false, type: '', resizable: true},
+    {width: 160, label: '实收金额', prop: 'amountReceived', query: false, type: 'text', resizable: true},
+    {width: 160, label: '卡内余额', prop: 'cardBalance', query: false, type: 'text', resizable: true},
+    {
+      width: 160, label: '卡过期时间',
+      prop: 'cardExpired',
+      query: true,
+      sortable: 'custom',
+      type: 'datetime',
+      resizable: true,
+      conf: {format: (val: any) => u.fmt.fmtDateTime(val)}
+    },
+    {width: 160, label: '卡内码', prop: 'cardId', query: false, type: 'text', resizable: true},
+    {width: 160, label: '卡串号', prop: 'cardSn', query: false, type: 'text', resizable: true},
+    {width: 160, label: '卡类型', prop: 'cardType', query: false, type: '', resizable: true},
+    {
+      width: 160, label: '关机方式',
+      prop: 'closeType',
+      query: true,
+      type: 'dict',
+      conf: {dict: 'Order.closeType'},
+      resizable: true
+    },
+    {width: 160, label: '投币的累计金额', prop: 'coinMoney', query: false, type: 'text', resizable: true},
+    {width: 160, label: '投币的次数', prop: 'coinNum', query: false, type: 'text', resizable: true},
+    {width: 160, label: '开单时间', prop: 'createTime', query: false, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDateTime(val)}},
+    // {
+    //   width:160,label: '费用明细',
+    //   prop: 'detail',
+    //   query: true,
+    //   type: 'text',
+    //   resizable: true
+    // },
+
+    {width: 160, label: '设备名称', prop: 'deviceName', query: false, type: 'text', resizable: true},
+    {width: 160, label: '优惠金额', prop: 'discountAmount', query: false, type: '', resizable: true},
+    {width: 160, label: '优惠金额', prop: 'discountMoney', query: false, type: '', resizable: true},
+    {width: 160, label: '优惠方式', prop: 'discountType', query: true, type: 'dict', conf: {dict: 'Activity.discountType'}, resizable: true},
+    {width: 160, label: '结束时间', prop: 'endTime', query: false, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDateTime(val)}},
+    {
+      width: 160, label: '设备空闲关机倒计时剩余时间',
+      prop: 'idleRemainTime',
+      query: true,
+      type: 'text',
+      resizable: true
+    },
+    {width: 160, label: '发票状态', prop: 'invoiceStatus', query: true, type: 'dict', conf: {dict: 'Invoice.status'}, resizable: true},
+    {width: 160, label: '会员折扣比例', prop: 'memberDiscount', query: false, type: 'text', resizable: true},
+    {width: 160, label: '开机方式', prop: 'openType', query: true, type: 'dict', conf: {dict: 'Order.openType'}, resizable: true},
+    {width: 160, label: '订单操作剩余操作时间(单位秒)', prop: 'operationRemainTime', query: false, type: 'text', resizable: true},
+    {width: 160, label: '本机订单号', prop: 'orderIdLocal', query: false, type: 'text', resizable: true},
+    {width: 160, label: '订单状态', prop: 'orderStatus', query: true, type: 'dict', conf: {dict: 'Order.status'}, resizable: true},
+    {width: 160, label: '支付状态', prop: 'payStatus', query: true, type: 'dict', conf: {dict: 'Order.pay'}, resizable: true},
+    {width: 160, label: '本次开机的预付金额', prop: 'prepayMoney', query: true, type: '', resizable: true},
+    {width: 160, label: '产品key', prop: 'productKey', query: true, type: 'text', resizable: true},
+    {width: 160, label: '开始时间', prop: 'startTime', query: false, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
+    {width: 160, label: '站点ID', prop: 'stationId', query: true, type: 'text', resizable: true},
+    {width: 160, label: '停机原因', prop: 'stopReason', query: false, type: 'text', resizable: true},
+    {
+      width: 160,
+      label: '更新时间',
+      fixed: 'right',
+      prop: 'updateTime',
+      query: false,
+      sortable: 'custom',
+      type: 'datetime',
+      resizable: true,
+      conf: {format: (val: any) => u.fmt.fmtDate(val)}
+    },
   ],
 })
 
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
-//
+// //:' +
+// 'name 名称 price 单价(单位分) ' +
+// 'seconds 时长(单位秒) ' +
+// 'amount 费用(单位分)' +
+// ' space⻋位或场地,' +
+// 'water清水,' +
+// 'foam泡沫,' +
+// 'leaner吸尘,' +
+// 'tap水龙头,' +
+// 'user_ext用户扩展,消毒或吹干等功能,' +
+// 'coat镀膜,' +
+// 'blow吹气
 //         }
 // );
 
@@ -187,18 +279,18 @@ onBeforeMount(() => {
 onMounted(() => {
   loadData();
 
-  nextTick(()=>{
+  nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
     state.tableData.height = bodyHeight - queryHeight - 220
   })
 
-  mittBus.on("washOrder.refresh",()=>{
+  mittBus.on("washOrder.refresh", () => {
     loadData();
   })
 });
 
-onBeforeUnmount(()=>{
+onBeforeUnmount(() => {
   mittBus.off("washOrder.refresh")
 })
 
@@ -207,16 +299,33 @@ onBeforeUnmount(()=>{
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/washOrder/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
-    let {list, count} = res;
+    let {list, total} = res;
+
+    list.forEach((item:any)=>{
+      if(item.detail){
+        let parse = JSON.parse(item.detail);
+        item.detail = parse.filter((k:any)=>k.amount>0||k.seconds>0).map((s:any)=>{
+          return {
+            name:u.fmt.fmtDict(s.name,'Order.feeType'),
+            seconds:u.fmt.fmtDuration(s.seconds),
+            price:u.fmt.fmtMoney(s.price),
+            amount:u.fmt.fmtMoney(s.amount),
+          }
+        })
+      }else{
+        item.detail={}
+      }
+    })
+
     state.tableData.data = list;
-    state.pageQuery.total = count;
+    state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };

+ 5 - 5
admin-web/src/views/admin/refund/index.vue

@@ -222,7 +222,7 @@ onBeforeMount(() => {
 
 onMounted(() => {
   let query = route.query;
-  console.log(route.params, route.query)
+  //console.log(route.params, route.query)
   if (query.mobilePhone) {
     state.formQuery.mobilePhone = query.mobilePhone;
   }
@@ -259,7 +259,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -274,19 +274,19 @@ const onRefundClick = ( row: any) => {
       Msg.message(`操作已提交`)
       loadData(true)
     }).catch(e => {
-      console.error(e)
+      //console.error(e)
     })
   })
 };
 
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 4 - 4
admin-web/src/views/admin/role/dialog.vue

@@ -144,21 +144,21 @@ const onSubmit = (formEl: FormInstance | undefined) => {
     closeDialog();
     return;
   }
-  console.log(state.ruleForm)
+  //console.log(state.ruleForm)
   if (!formEl) return
   formEl.validate((valid, fields) => {
-    console.log(fields)
+    //console.log(fields)
     if (valid) {
       const url = state.ruleForm.id > 0 ? "role/modify" : "role/add"
       $body(url, state.ruleForm).then(() => {
         Msg.message("操作成功","success")
-        console.log('submit!')
+        //console.log('submit!')
         closeDialog();
         emit('refresh');
       })
 
     } else {
-      console.log('error submit!', fields)
+      //console.log('error submit!', fields)
     }
   })
 };

+ 9 - 9
admin-web/src/views/admin/role/index.vue

@@ -122,7 +122,7 @@ const loadPermissionList = (roleList: Array<any>) => {
     //构造权限数组
     let data = [] as Array<any>;
     var permMap = u.groupByKey(res, "pid");
-    console.log(permMap)
+    //console.log(permMap)
     let roleMap = new Map();
     state.immutableRoleList = [] as Array<string>;
     roleList.forEach(role => {
@@ -133,7 +133,7 @@ const loadPermissionList = (roleList: Array<any>) => {
       });
       roleMap.set(role.id, role)
     });
-    console.log(state.columns)
+    //console.log(state.columns)
     let topPermissionList = permMap['0']
     if (u.isEmptyOrNull(topPermissionList)) {
       Msg.message("没有权限数据", 'error')
@@ -176,10 +176,10 @@ const loadPermissionList = (roleList: Array<any>) => {
 
 
     state.tableData.data = data;
-    console.log(state.tableData.data)
+    //console.log(state.tableData.data)
     state.tableData.loading = false;
   }).catch(e => {
-    //console.log(e)
+    ////console.log(e)
     state.tableData.loading = false;
   })
 }
@@ -192,7 +192,7 @@ const loadData = () => {
     //构造权限数组
     loadPermissionList(res);
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -203,7 +203,7 @@ const handleOpenDialog = (id: number, readonly: boolean) => {
 
 const handleToggleRoleCheck = (row, column, cell, event) => {
   state.changed = true;
-  console.log(row, column, cell)
+  //console.log(row, column, cell)
   if(column.rawColumnKey==='permName'){
     // tableRef.value
     return;
@@ -212,7 +212,7 @@ const handleToggleRoleCheck = (row, column, cell, event) => {
   let index = state.tableData.data.findIndex(k => k.id === row.id);
   if (index >= 0) {
     let record = state.tableData.data[index];
-    //console.log(record)
+    ////console.log(record)
     let bol = !record[column.rawColumnKey];
     state.tableData.data[index][column.rawColumnKey] = bol;
     if (!u.isEmptyOrNull(record.children)) {
@@ -239,7 +239,7 @@ const handleSaveRolePermission = () => {
   let map = new Map();
 
   let keys = Object.keys(state.tableData.data[0])
-  console.log(state.tableData.data)
+  //console.log(state.tableData.data)
   state.tableData.data.forEach(record => {
     keys.forEach((k: string) => {
       if (k.startsWith("role_")) {
@@ -274,7 +274,7 @@ const handleSaveRolePermission = () => {
     })
   })
 
-  //console.log(map)
+  ////console.log(map)
   map.forEach((value: Array<string>, key: any) => {
     updateRoles.push({
       id: Number(key),

+ 211 - 0
admin-web/src/views/admin/station/device/dialog.vue

@@ -0,0 +1,211 @@
+<style scoped lang="scss">
+
+</style>
+<template>
+  <div class="system-dialog-container">
+    <el-dialog
+        :title="state.dialog.title"
+        v-model="state.dialog.isShowDialog"
+        width="600px"
+        draggable
+        destroy-on-close
+        :close-on-click-modal="false"
+        align-center>
+      <el-form
+          inline
+          :model="state.ruleForm"
+          :rules="state.rules"
+          label-position="top"
+          ref="formRef"
+          size="default"
+          label-width="130px"
+          class="mt5">
+        <el-form-item label="设备名称" prop="deviceName" class="wd350">
+          <el-input
+              v-model="state.ruleForm.deviceName"
+              placeholder="设备名称"
+              clearable
+              class="wd200">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="产品key" prop="productKey" class="wd350">
+          <el-input
+              v-model="state.ruleForm.productKey"
+              placeholder="产品key"
+              clearable
+              class="wd200">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="所在网点" prop="stationId" class="wd350">
+          <ext-select
+              class="wd200"
+              v-model="state.ruleForm.stationId"
+              placeholder="所在网点"
+              url="washStation/list"
+              label-key="stationName"
+              value-key="stationId">
+          </ext-select>
+        </el-form-item>
+        <el-form-item label="网点ID" prop="stationId" class="wd350">
+          <el-input
+              v-model="state.ruleForm.stationId"
+              placeholder="网点ID"
+              clearable
+              readonly
+              class="w100">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="状态" prop="state" class="wd350">
+          <ext-d-select type="WashDevice.status" v-model="state.ruleForm.status" class="wd200"></ext-d-select>
+        </el-form-item>
+
+        <el-form-item label="是否有泡沫" prop="hasFoam" class="wd350">
+          <ext-d-select type="WashDevice.foam" v-model="state.ruleForm.hasFoam" class="wd200"></ext-d-select>
+        </el-form-item>
+        <el-form-item label="是否有水" prop="hasWater" class="wd350">
+          <ext-d-select type="WashDevice.water" v-model="state.ruleForm.hasWater" class="wd200"></ext-d-select>
+        </el-form-item>
+
+
+        <el-form-item label="板载温度" prop="temperatureChip" class="wd350">
+          <el-input
+              v-model="state.ruleForm.temperatureChip"
+              placeholder="板载温度传感器的温度值"
+              clearable
+              class="w100">
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="故障原因" prop="faultReason" class="w100">
+          <el-input
+              v-model="state.ruleForm.faultReason"
+              placeholder="故障原因"
+              clearable
+              type="textarea"
+              class="w100">
+          </el-input>
+        </el-form-item>
+        <!--        <el-form-item label="设备主状态机的当前状态(状态可能增加或减少,仅供调试参考。)" prop="fsmState" class="wd350">
+                  <el-input
+                      v-model="state.ruleForm.fsmState"
+                      placeholder="设备主状态机的当前状态(状态可能增加或减少,仅供调试参考。)"
+                      clearable
+                      class="w100">
+                  </el-input>
+                </el-form-item>-->
+        <el-form-item label="功能" prop="functions" class="w100">
+          <el-input
+              v-model="state.ruleForm.functions"
+              placeholder="功能"
+              clearable
+              class="w100">
+          </el-input>
+        </el-form-item>
+
+
+      </el-form>
+
+      <template #footer>
+				<span class="dialog-footer">
+					<el-button @click="onCancel" size="default">取 消</el-button>
+					<el-button :loading="state.btnLoading" type="primary" @click="onSubmit" size="default">{{ state.dialog.submitTxt }}</el-button>
+				</span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts" name="WashDeviceDialog">
+import {defineAsyncComponent, reactive, onMounted, ref} from 'vue';
+import {Msg} from "/@/utils/message";
+import {$body, $get} from "/@/utils/request";
+import u from '/@/utils/u'
+import ExtDSelect from "/@/components/form/ExtDSelect.vue";
+import ExtSelect from "/@/components/form/ExtSelect.vue";
+
+// 引入组件
+const ExtDetailForm = defineAsyncComponent(() => import('/@/components/form/ExtDetailForm.vue'));
+
+// 定义子组件向父组件传值/事件
+const emit = defineEmits(['refresh']);
+const formRef = ref();
+//定义初始变量,重置使用
+const initState = () => ({
+  ruleForm: {
+    id: 0
+  },
+  btnLoading: false,
+  dialog: {
+    isShowDialog: false,
+    type: '',
+    title: '',
+    submitTxt: '',
+  },
+  rules: {
+    deviceName: [u.validator.required],
+    productKey: [u.validator.required],
+  },
+})
+
+// 定义变量内容
+const state = reactive(initState());
+
+
+// 打开弹窗
+const open = (action: string = 'add', row: any) => {
+  state.dialog.title = u.dialog.actions[action].title + "『洗车设备』"
+  state.dialog.submitTxt = u.dialog.actions[action].btn + "『洗车设备』"
+  state.dialog.isShowDialog = true;
+  if (action !== 'add') {
+    loadData(row.id);
+  } else {
+    state.ruleForm = Object.assign(state.ruleForm, row);
+  }
+};
+// 关闭弹窗
+const onClose = () => {
+  state.dialog.isShowDialog = false;
+  Object.assign(state, initState())
+};
+// 取消
+const onCancel = () => {
+  onClose();
+};
+// 提交
+const onSubmit = () => {
+  formRef.value.validate((v: boolean) => {
+    if (v) {
+      state.btnLoading = true;
+      const url = state.ruleForm.id > 0 ? "washDevice/modify" : "washDevice/add"
+      $body(url, state.ruleForm).then(() => {
+        state.btnLoading = false;
+        Msg.message('操作成功');
+        //console.log('submit!')
+        onClose();
+        emit('refresh');
+      })
+    } else {
+      state.btnLoading = false;
+      Msg.message('请先完整填写表单', 'error');
+    }
+  })
+};
+
+const handleFormChange = (formData: any) => {
+  //console.log(formData)
+}
+
+// 初始化数据
+const loadData = (id: number) => {
+  $get(`washDevice/detail/${id}`).then((res: any) => {
+    state.ruleForm = res;
+  })
+}
+
+// 暴露变量
+defineExpose({
+  open
+});
+
+
+</script>

+ 45 - 34
admin-web/src/views/admin/station/device/index.vue

@@ -32,10 +32,13 @@
           ref="queryRef"
           v-model="state.formQuery"
           :columns="state.columns"
-          :import-config="state.importConfig"
-          :export-config="state.exportConfig"
           @on-change="loadData(true)"
           @imported="loadData(true)">
+        <template #extraRight>
+          <el-button  v-auth="'washDevice.add'"   size="default" plain  type="success" class="ml10" @click="handleRowClick('add',null)">
+            <SvgIcon name="ele-FolderAdd"/>
+            新增
+          </el-button></template>
         <!--  <template #extraQuery></template>
           <template #extraLeft></template>
           <template #extraRight></template>-->
@@ -53,12 +56,12 @@
       <ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
     </el-card>
   </div>
-  <WashDeviceDialog ref="washDeviceDialogRef" @refresh="loadData(true)"/>
+    <DeviceDialog ref="device_dialog_ref" @refresh="loadData(true)"/>
 </template>
 
-<script setup lang="ts" name="WashDeviceList">
-import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance,nextTick,onBeforeUnmount} from 'vue';
-import {$body,$get} from "/@/utils/request";
+<script setup lang="ts" name="adminStationDevice">
+import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
+import {$body, $get} from "/@/utils/request";
 import u from '/@/utils/u'
 import {Msg} from "/@/utils/message";
 import {Session} from "/@/utils/storage";
@@ -73,43 +76,51 @@ import mittBus from '/@/utils/mitt';
 
 import {ElButton} from 'element-plus'
 
+import DeviceDialog from '/@/views/admin/station/device/dialog.vue'
 
 
 //定义引用
 const queryRef = ref();
-const washDeviceDialogRef = ref();
+const device_dialog_ref = ref();
 
 //定义变量
 const state = reactive({
   formQuery: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
   tableData: {
-    height:500,
-    data: [] as Array < any >,
+    height: 500,
+    data: [] as Array<any>,
     loading: false
   },
   importConfig: {},
   exportConfig: {},
   columns: [
-    {type: 'selection', width: 60, align: 'center', fixed: 'left'},
-    {label: '', prop: 'createTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '设备名称', prop: 'deviceName', query: true, type: 'text', resizable: true},
-    {label: '故障原因', prop: 'faultReason', query: true, type: 'text', resizable: true},
-    {label: '设备主状态机的当前状态(状态可能增加或减少,仅供调试参考。)', prop: 'fsmState', query: true, type: 'text', resizable: true},
-    {label: '功能', prop: 'functions', query: true, type: 'text', resizable: true},
-    {label: '是否有泡沫:-1不支持或未开启,0无泡沫,1有泡沫', prop: 'hasFoam', query: true, type: '', resizable: true},
-    {label: '是否有水:-1不支持或未开启,0无水,1有水', prop: 'hasWater', query: true, type: '', resizable: true},
-    {label: '产品key', prop: 'productKey', query: true, type: 'text', resizable: true},
-    {label: '状态:init设备正在初始化,idle设备空闲,busy设备忙碌,sleep不在营业时间,maintenance维护模式,fault设备故障', prop: 'state', query: true, type: 'text', resizable: true},
-    {label: '', prop: 'stationId', query: true, type: 'text', resizable: true},
-    {label: '板载温度传感器的温度值', prop: 'temperatureChip', query: true, type: '', resizable: true},
-    {label: '', prop: 'updateTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
-    {label: '本次上电以来的时间戳', prop: 'uptimeMs', query: true, type: 'text', resizable: true},
-    {                label: '操作', prop: 'action', type: 'render', width: 180, align: 'center', fixed: 'right',
+    // {type: 'selection', width: 60, align: 'center', fixed: 'left'},
+    {label: '设备名称', prop: 'deviceName', width: 180, query: true, type: 'text', resizable: true, fixed: 'left'},
+    {label: '状态', prop: 'state', width: 180,query: true, type: 'dict', conf: {dict: 'WashDevice.status'}, resizable: true},
+    {label: '网点ID', prop: 'stationId', width: 180,query: true, type: 'text', resizable: true},
+    {label: '产品key', prop: 'productKey', width: 180, query: true, type: 'text', resizable: true},
+    {label: '设备主机状态', prop: 'fsmState', width: 180, query: true, type: 'text', resizable: true},
+    {
+      label: '本次运行时长', prop: 'uptimeMs', width: 180, query: false, type: 'render', resizable: true,
+      render: (h: any, row: any) => {
+        return (
+            h('div', null,u.fmt.fmtDuration(row))
+        )
+      }
+    },
+    {label: '功能', prop: 'functions', width: 180, query: true, type: 'text', resizable: true},
+    {label: '是否有泡沫', prop: 'hasFoam', width: 180, query: true, type: 'dict', conf: {dict: 'WashDevice.foam'}, resizable: true},
+    {label: '是否有水', prop: 'hasWater', width: 180, query: true, type: 'dict', conf: {dict: 'WashDevice.water'}, resizable: true},
+    {label: '当前温度', prop: 'temperatureChip', width: 180, query: false, type: 'text', resizable: true},
+    {label: '创建时间', prop: 'createTime', query: false, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDateTime(val)}},
+    {label: '更新时间', prop: 'updateTime', query: false, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDateTime(val)}},
+    {
+      label: '操作', prop: 'action', type: 'render', width: 180, align: 'center', fixed: 'right',
       render: (h: any, row: any) => {
         return (
             h('div', null, [
@@ -141,7 +152,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -166,18 +177,18 @@ onBeforeMount(() => {
 onMounted(() => {
   loadData();
 
-  nextTick(()=>{
+  nextTick(() => {
     let bodyHeight = document.body.clientHeight;
     let queryHeight = queryRef.value.$el.clientHeight;
     state.tableData.height = bodyHeight - queryHeight - 220
   })
 
-  mittBus.on("washDevice.refresh",()=>{
+  mittBus.on("washDevice.refresh", () => {
     loadData();
   })
 });
 
-onBeforeUnmount(()=>{
+onBeforeUnmount(() => {
   mittBus.off("washDevice.refresh")
 })
 
@@ -186,23 +197,23 @@ onBeforeUnmount(()=>{
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/washDevice/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
-    let {list, count} = res;
+    let {list, total} = res;
     state.tableData.data = list;
-    state.pageQuery.total = count;
+    state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
 
 // 打开详情页弹窗
 const handleRowClick = (type: string, row: any) => {
-  washDeviceDialogRef.value.open(type, row);
+  device_dialog_ref.value.open(type, row);
 };
 // 删除点击
 const handleRowDelete = (row: any) => {

+ 12 - 12
admin-web/src/views/admin/station/device/upload.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-      :title="'导入『电桩信息』'"
+      :title="'导入『设备信息』'"
       v-model="state.dialog.isShowDialog"
       width="75%"
       destroy-on-close
@@ -284,7 +284,7 @@ const debounceImport = useThrottleFn(() => {
 //表头选择器滚动
 const handleFieldHeaderScroll = (ev: any) => {
   let {scrollLeft, scrollTop} = ev;
-  // console.log(scrollLeft, scrollTop, ev)
+  // //console.log(scrollLeft, scrollTop, ev)
   if (scrollLeft >= 0) {
     let st = excelRef.value.getScroll();
     const el = excelRef.value?.$el.querySelector('.vxe-table--body-wrapper')
@@ -297,7 +297,7 @@ const handleFieldHeaderScroll = (ev: any) => {
 //数据表格滚动
 const handleDataTableScroll = (ev: any) => {
   let {scrollLeft} = ev;
-  // console.log(type, scrollLeft, scrollHeight)
+  // //console.log(type, scrollLeft, scrollHeight)
   if (scrollLeft >= 0) {
     fieldHeaderScrollRef.value?.setScrollLeft(scrollLeft);
   }
@@ -332,7 +332,7 @@ const handleRow = (command: string, row: any, rowIndex: number) => {
 }
 
 const parseExcel = (sheetName: string = "") => {
-  // console.log(sheetName, state.excelForm.sheet,files)
+  // //console.log(sheetName, state.excelForm.sheet,files)
   // if(sheetName==state.excelForm.sheet&&state.excelForm.sheet){
   //   return;
   // }
@@ -343,31 +343,31 @@ const parseExcel = (sheetName: string = "") => {
     state.excelForm.sheets = []
     return;
   }
-  // console.log(files)
+  // //console.log(files)
   Msg.showLoading('解析中...')
   state.uploadFileName = files.value[0].name;
   let reader = new FileReader();
   reader.onload = function () {
-    // console.log(reader)
+    // //console.log(reader)
 
     let fileData = reader.result;
     let wb = XLSX.read(fileData, {type: 'binary', cellDates: true});
     state.excelForm.sheets = wb.SheetNames;
     // {header:1} 取消标题列.
-    // console.log(wb.SheetNames)
+    // //console.log(wb.SheetNames)
     let sheet = sheetName || wb.SheetNames[0];
     state.excelForm.sheet = sheet;
     let rowList: (any) = XLSX.utils.sheet_to_json(wb.Sheets[sheet], {header: 1});
-    // console.log(rowList)
+    // //console.log(rowList)
     let maxColumnLength = 1;
     rowList.forEach((row: any, idx: number) => {
-      // console.log(row)
+      // //console.log(row)
       if (idx < 10) {
         maxColumnLength = Math.max(maxColumnLength, row.length);
       }
     })
 
-    // console.log(maxColumnLength, rowList)
+    // //console.log(maxColumnLength, rowList)
     let tmpHeaders: Array<any> = []
     let headers = rowList[state.excelForm.rowHeaderIndex];
     for (let i = 0; i < maxColumnLength; i++) {
@@ -385,14 +385,14 @@ const parseExcel = (sheetName: string = "") => {
 
     }
     state.excelForm.columns = state.initColumnList.concat(tmpHeaders)
-    // console.log(state.excelForm.columns)
+    // //console.log(state.excelForm.columns)
 
     let tmpContents: any[] = []
     for (let i = state.excelForm.rowContentIndex; i < rowList.length; i++) {
       let dl = rowList[i];
       let rowItem = {};
       let fullEmpty = true;
-      console.log(i,dl)
+      //console.log(i,dl)
       dl.forEach((rowValue: any, columnIdx: number) => {
         if (rowValue) {
           fullEmpty = false;

+ 2 - 2
admin-web/src/views/admin/station/list/dialog.vue

@@ -228,7 +228,7 @@ const onSubmit = () => {
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -240,7 +240,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化数据

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

@@ -141,7 +141,7 @@ const washStationDialogRef = ref();
 const state = reactive({
   formQuery: {},
   pageQuery: {
-    pageIndex: 1,
+    pageNum: 1,
     pageSize: 10,
     total: 0
   },
@@ -157,7 +157,7 @@ const state = reactive({
     {label: '站点名称', prop: 'stationName', query: true, type: 'text', resizable: true},
     {label: '站点照片', prop: 'pictures', query: false, type: 'text', resizable: true},
     {label: '站点状态', prop: 'stationStatus', query: true, type: 'dict', conf:{dict:'WashStation.status'},resizable: true},
-    {label: '站点类型', prop: 'stationType', query: true, type: 'text', resizable: true},
+    {label: '站点类型', prop: 'stationType', query: true, type: 'dict',conf:{dict:'WashStation.type'}, resizable: true},
     {label: '地址', prop: 'address', query: true, type: 'text', resizable: true},
     {label: '服务电话', prop: 'serviceTel', query: true, type: 'text', resizable: true},
     {label: '营业时间描述', prop: 'businessHours', query: false, type: 'text', resizable: true},
@@ -173,7 +173,7 @@ const state = reactive({
 
 // 监听双向绑定 modelValue 的变化
 // watch(
-//         () => state.pageIndex,
+//         () => state.pageNum,
 //         () => {
 //
 //         }
@@ -197,16 +197,16 @@ onMounted(() => {
 // 初始化表格数据
 const loadData = (refresh: boolean = false) => {
   if (refresh) {
-    state.pageQuery.pageIndex = 1;
+    state.pageQuery.pageNum = 1;
   }
   state.tableData.loading = true;
   $body(`/washStation/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
-    let {list, count} = res;
+    let {list, total} = res;
     state.tableData.data = list;
-    state.pageQuery.total = count;
+    state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };

+ 10 - 10
admin-web/src/views/admin/station/list/upload.vue

@@ -286,7 +286,7 @@ const debounceImport = useThrottleFn(() => {
 //表头选择器滚动
 const handleFieldHeaderScroll = (ev: any) => {
   let {scrollLeft, scrollTop} = ev;
-  // console.log(scrollLeft, scrollTop, ev)
+  // //console.log(scrollLeft, scrollTop, ev)
   if (scrollLeft >= 0) {
     let st = excelRef.value.getScroll();
     const el = excelRef.value?.$el.querySelector('.vxe-table--body-wrapper')
@@ -299,7 +299,7 @@ const handleFieldHeaderScroll = (ev: any) => {
 //数据表格滚动
 const handleDataTableScroll = (ev: any) => {
   let {scrollLeft} = ev;
-  // console.log(type, scrollLeft, scrollHeight)
+  // //console.log(type, scrollLeft, scrollHeight)
   if (scrollLeft >= 0) {
     fieldHeaderScrollRef.value?.setScrollLeft(scrollLeft);
   }
@@ -334,7 +334,7 @@ const handleRow = (command: string, row: any, rowIndex: number) => {
 }
 
 const parseExcel = (sheetName: string = "") => {
-  // console.log(sheetName, state.excelForm.sheet,files)
+  // //console.log(sheetName, state.excelForm.sheet,files)
   // if(sheetName==state.excelForm.sheet&&state.excelForm.sheet){
   //   return;
   // }
@@ -345,31 +345,31 @@ const parseExcel = (sheetName: string = "") => {
     state.excelForm.sheets = []
     return;
   }
-  // console.log(files)
+  // //console.log(files)
   Msg.showLoading('解析中...')
   state.uploadFileName = files.value[0].name;
   let reader = new FileReader();
   reader.onload = function () {
-    // console.log(reader)
+    // //console.log(reader)
 
     let fileData = reader.result;
     let wb = XLSX.read(fileData, {type: 'binary', cellDates: true});
     state.excelForm.sheets = wb.SheetNames;
     // {header:1} 取消标题列.
-    // console.log(wb.SheetNames)
+    // //console.log(wb.SheetNames)
     let sheet = sheetName || wb.SheetNames[0];
     state.excelForm.sheet = sheet;
     let rowList: (any) = XLSX.utils.sheet_to_json(wb.Sheets[sheet], {header: 1});
-    // console.log(rowList)
+    // //console.log(rowList)
     let maxColumnLength = 1;
     rowList.forEach((row: any, idx: number) => {
-      // console.log(row)
+      // //console.log(row)
       if (idx < 10) {
         maxColumnLength = Math.max(maxColumnLength, row.length);
       }
     })
 
-    // console.log(maxColumnLength, rowList)
+    // //console.log(maxColumnLength, rowList)
     let tmpHeaders: Array<any> = []
     let headers = rowList[state.excelForm.rowHeaderIndex];
     for (let i = 0; i < maxColumnLength; i++) {
@@ -387,7 +387,7 @@ const parseExcel = (sheetName: string = "") => {
 
     }
     state.excelForm.columns = state.initColumnList.concat(tmpHeaders)
-    // console.log(state.excelForm.columns)
+    // //console.log(state.excelForm.columns)
 
     let tmpContents: any[] = []
     for (let i = state.excelForm.rowContentIndex; i < rowList.length; i++) {

+ 4 - 4
admin-web/src/views/admin/station/stat/dialog.vue

@@ -195,15 +195,15 @@ const onCancel = () => {
 // 提交
 const onSubmit = () => {
   formRef.value.validate((valid, fields) => {
-    // console.log('basic checkForm!', valid,fields)
-    console.log(state.ruleForm)
+    // //console.log('basic checkForm!', valid,fields)
+    //console.log(state.ruleForm)
     if (valid) {
       state.btnLoading = true;
       const url = state.ruleForm.id > 0 ? "/stat/modifyStationStatMonth" : "stationStatMonth/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         onClose();
         emit('refresh');
       })
@@ -216,7 +216,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 // 初始化表格数据

+ 3 - 3
admin-web/src/views/admin/station/stat/index.vue

@@ -228,7 +228,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -250,12 +250,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 3 - 3
admin-web/src/views/admin/station/statment/index.vue

@@ -246,7 +246,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -268,12 +268,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 7 - 7
admin-web/src/views/admin/user/dialog.vue

@@ -142,7 +142,7 @@ const state = reactive(initState());
 
 // 打开弹窗
 const open = (action: string = 'add', row: any) => {
-  console.log(state.ruleForm)
+  //console.log(state.ruleForm)
   loadRole(row);
   state.dialog.title = u.dialog.actions[action].title + "『运营用户』"
   state.dialog.submitTxt = u.dialog.actions[action].btn + "『运营用户』"
@@ -157,14 +157,14 @@ const handleCheckedRoleChange = () => {
 }
 
 const handleAvatarChange = (val: string) => {
-  console.log("avatar:", val)
+  //console.log("avatar:", val)
 }
 
 // 关闭弹窗
 const onClose = () => {
   state.dialog.isShowDialog = false;
   Object.assign(state, initState())
-  console.log(state.ruleForm)
+  //console.log(state.ruleForm)
 };
 // 取消
 const onCancel = () => {
@@ -173,18 +173,18 @@ const onCancel = () => {
 // 提交
 const onSubmit = () => {
   formRef.value.validate((valid, fields) => {
-    // console.log('basic checkForm!', valid,fields)
+    // //console.log('basic checkForm!', valid,fields)
     if (valid) {
       state.btnLoading = true;
       const url = state.ruleForm.id > 0 ? "admin-user/modify" : "admin-user/add"
       $body(url, state.ruleForm).then((id) => {
-        console.log(id)
+        //console.log(id)
         if(id){
           state.ruleForm.id = id;
         }
         state.btnLoading = false;
         Msg.message('操作成功');
-        console.log('submit!')
+        //console.log('submit!')
         if (state.ruleForm.id > 0) {
           $body(`admin-user/updateRole`, {userId: state.ruleForm.id, roleIdList: state.checkRoleIdList}).then(() => {
             onClose();
@@ -212,7 +212,7 @@ const onSubmit = () => {
 };
 
 const handleFormChange = (formData: any) => {
-  console.log(formData)
+  //console.log(formData)
 }
 
 const loadRole = (row: any) => {

+ 3 - 3
admin-web/src/views/admin/user/index.vue

@@ -223,7 +223,7 @@ const loadData = (refresh: boolean = false) => {
     state.pageQuery.total = total;
     state.tableData.loading = false;
   }).catch(e => {
-    console.error(e)
+    //console.error(e)
     state.tableData.loading = false;
   })
 };
@@ -245,12 +245,12 @@ const onRowDel = (row: any) => {
 };
 
 const handleTableSelectionChange = (selection: any) => {
-  console.log("handleTableSelectionChange>>", selection)
+  //console.log("handleTableSelectionChange>>", selection)
   // emit("on-check-change", selection)
 }
 
 const handleTableSortChange = (column, prop, order) => {
-  console.log("handleTableSortChange>>", column, prop, order)
+  //console.log("handleTableSortChange>>", column, prop, order)
   // emit("on-sort-change", column)
 }
 

+ 3 - 4
admin-web/src/views/login/component/account.vue

@@ -111,8 +111,7 @@ const encryptData = (str:string)=>{
 }
 
 const initData = () => {
-  $body("/dataDict/list", {}).then((res: any) => {
-    let {list}  = res;
+  $body("/dataDict/list", {}).then((list: any) => {
     var dictGroup = u.groupByKey(list,"code");
     Session.set("dicts", dictGroup);
   });
@@ -157,7 +156,7 @@ const onSignIn = async () => {
   }
   $body(`/admin-user/login`, temp).then((res: any) => {
     let {id,accessToken} = res;
-    console.log(res)
+    //console.log(res)
     if (accessToken) {
       // 存储 token 到浏览器缓存
       Session.set('accessToken', accessToken);
@@ -174,7 +173,7 @@ const onSignIn = async () => {
     }
   }).catch(e => {
     state.loading.signIn = false;
-    console.error(e)
+    //console.error(e)
   });
 
 

+ 59 - 0
car-wash-admin/src/main/java/com/kym/admin/controller/WashOrderController.java

@@ -0,0 +1,59 @@
+package com.kym.admin.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.kym.common.R;
+import com.kym.common.annotation.SysLog;
+import com.kym.common.controller.IController;
+import com.kym.entity.common.PageParams;
+import com.kym.entity.miniapp.WashDevice;
+import com.kym.entity.miniapp.queryParams.WashOrderQueryParams;
+import com.kym.service.miniapp.WashOrderService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 洗车订单表 后台控制器
+ * </p>
+ *
+ * @author skyline
+ * @since 2024-09-11
+ */
+@RestController
+@RequestMapping("/washOrder")
+public class WashOrderController extends IController {
+
+    private final WashOrderService washOrderService;
+
+    public WashOrderController(WashOrderService washOrderService) {
+        this.washOrderService = washOrderService;
+    }
+
+
+    /**
+     * 获取订单列表
+     *
+     * @param query
+     * @return
+     */
+    @SaCheckPermission("washOrder.list")
+    @PostMapping(value = "/list")
+    R<?> list(@RequestBody WashOrderQueryParams query) {
+        return resp(() -> washOrderService.list(query));
+    }
+
+
+    @SaCheckPermission("washOrder.list")
+    @SysLog("详情")
+    @GetMapping("detail/{id}")
+    R<?> detail(@PathVariable long id) {
+        return R.success(washOrderService.detail(id));
+    }
+
+
+}

+ 2 - 1
car-wash-entity/src/main/java/com/kym/entity/miniapp/queryParams/WashOrderQueryParams.java

@@ -1,5 +1,6 @@
 package com.kym.entity.miniapp.queryParams;
 
+import com.kym.entity.common.PageParams;
 import lombok.Data;
 
 /**
@@ -8,7 +9,7 @@ import lombok.Data;
  * @date 2023-11-06 11:59
  */
 @Data
-public class WashOrderQueryParams {
+public class WashOrderQueryParams extends PageParams {
     private String orderId;
     private String stationId;
     private String shortId;

+ 4 - 0
car-wash-service/src/main/java/com/kym/service/miniapp/WashOrderService.java

@@ -25,4 +25,8 @@ public interface WashOrderService extends MyBaseService<WashOrder> {
     WashOrder queryOrder(WashOrderQueryParams params);
 
     PageBean<WashOrderVo> listMyWashOrder(PageParams params);
+
+    Object list(WashOrderQueryParams query);
+
+    Object detail(long id);
 }

+ 27 - 1
car-wash-service/src/main/java/com/kym/service/miniapp/impl/WashOrderServiceImpl.java

@@ -3,6 +3,7 @@ package com.kym.service.miniapp.impl;
 import cn.dev33.satoken.stp.StpUtil;
 import com.github.pagehelper.PageHelper;
 import com.kym.common.exception.BusinessException;
+import com.kym.common.utils.CommUtil;
 import com.kym.common.utils.OrderUtils;
 import com.kym.entity.common.PageBean;
 import com.kym.entity.common.PageParams;
@@ -123,11 +124,12 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
 
     /**
      * 当前用户订单列表
+     *
      * @param params
      * @return
      */
     @Override
-    public PageBean<WashOrderVo> listMyWashOrder(PageParams params){
+    public PageBean<WashOrderVo> listMyWashOrder(PageParams params) {
         PageHelper.startPage(params.getPageNum(), params.getPageSize());
         var res = lambdaQuery()
                 .eq(WashOrder::getUserId, StpUtil.getLoginIdAsLong())
@@ -140,4 +142,28 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
         }).toList();
         return new PageBean<>(voList);
     }
+
+
+    //region 管理后台
+    @Override
+    public PageBean<WashOrderVo> list(WashOrderQueryParams query) {
+        PageHelper.startPage(query.getPageNum(), query.getPageSize());
+        var res = lambdaQuery()
+                .eq(CommUtil.isNotEmptyAndNull(query.getStationId()), WashOrder::getStationId, query.getStationId())
+                .like(CommUtil.isNotEmptyAndNull(query.getOrderId()), WashOrder::getOrderId, query.getOrderId())
+                .orderByDesc(WashOrder::getId)
+                .list();
+        var voList = res.stream().map(order -> {
+            var vo = new WashOrderVo();
+            BeanUtils.copyProperties(order, vo);
+            return vo;
+        }).toList();
+        return new PageBean<>(voList);
+    }
+
+    @Override
+    public WashOrder detail(long id) {
+        return getById(id);
+    }
+    //endregion
 }