Jelajahi Sumber

管理后台及停车查询页编译路径修改

zuy 7 bulan lalu
induk
melakukan
1743383d45

+ 0 - 0
admin-web/parking.html → admin-web/public/parking.html


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

@@ -92,7 +92,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {
@@ -132,7 +132,7 @@ const onSubmit = () => {
     // //console.log('basic checkForm!', valid,fields)
     if (valid) {
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "adminUser/modify" : "adminUser/add"
+      const url = !!state.ruleForm.id ? "adminUser/modify" : "adminUser/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

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

@@ -128,7 +128,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0,
+    id: null,
     status:1
   },
   btnLoading: false,
@@ -178,7 +178,7 @@ const onSubmit = () => {
         return false;
       }
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "banner/modify" : "banner/add"
+      const url = !!state.ruleForm.id  ? "banner/modify" : "banner/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

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

@@ -104,7 +104,7 @@ const rules = reactive<FormRules>({
 
 const initState = () => ({
   ruleForm: {
-    id: 0,
+    id: null,
     parentName: null, // 上级部门
     parent: null, // 上级部门
     name: '', // 部门名称

+ 1 - 1
admin-web/src/views/admin/faq/dialog.vue

@@ -64,7 +64,7 @@ const faq_editor_ref = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0,
+    id: null,
     status:1,
 
   },

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

@@ -119,7 +119,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {
@@ -162,7 +162,7 @@ const onSubmit = () => {
   formRef.value.validate((v: boolean) => {
     if (v) {
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "feedback/modify" : "feedback/add"
+      const url = !!state.ruleForm.id  ? "feedback/modify" : "feedback/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

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

@@ -191,7 +191,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {

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

@@ -318,7 +318,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {
@@ -359,7 +359,7 @@ const onSubmit = () => {
   formRef.value.validate((v: boolean) => {
     if (v) {
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "washOrder/modify" : "washOrder/add"
+      const url = !!state.ruleForm.id ? "washOrder/modify" : "washOrder/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

+ 1 - 1
admin-web/src/views/admin/platform/deviceConfig/dialog.vue

@@ -369,7 +369,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {

+ 2 - 2
admin-web/src/views/admin/platform/rate/dialog.vue

@@ -81,7 +81,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {
@@ -124,7 +124,7 @@ const onSubmit = () => {
   formRef.value.validate((v: boolean) => {
     if (v) {
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "platform-fee-rate/modify" : "platform-fee-rate/add"
+      const url = !!state.ruleForm.id ? "platform-fee-rate/modify" : "platform-fee-rate/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

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

@@ -75,7 +75,7 @@ const state = reactive({
   readonly:false,
   action:'add',
   ruleForm: {
-    id:0,
+    id:null,
     name: '', // 角色名称
     roleSign: '', // 角色标识
     sort: 0, // 排序
@@ -149,7 +149,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
   formEl.validate((valid, fields) => {
     //console.log(fields)
     if (valid) {
-      const url = state.ruleForm.id > 0 ? "role/modify" : "role/add"
+      const url = !!state.ruleForm.id  ? "role/modify" : "role/add"
       $body(url, state.ruleForm).then(() => {
         Msg.message("操作成功","success")
         //console.log('submit!')

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

@@ -130,7 +130,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {
@@ -174,7 +174,7 @@ const onSubmit = () => {
   formRef.value.validate((v: boolean) => {
     if (v) {
       state.btnLoading = true;
-      const url = state.ruleForm.id > 0 ? "washDevice/modify" : "washDevice/add"
+      const url = !!state.ruleForm.id  ? "washDevice/modify" : "washDevice/add"
       $body(url, state.ruleForm).then(() => {
         state.btnLoading = false;
         Msg.message('操作成功');

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

@@ -328,6 +328,9 @@ const onSubmit = () => {
           //console.log('submit!')
           onClose();
           emit('refresh');
+        }).catch(e=>{
+          console.error(e);
+          state.btnLoading = false;
         })
       } else {
         state.btnLoading = false;

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

@@ -132,7 +132,7 @@ const formRef = ref();
 //定义初始变量,重置使用
 const initState = () => ({
   ruleForm: {
-    id: 0
+    id: null
   },
   btnLoading: false,
   dialog: {