Bläddra i källkod

Merge branch 'camera-lhf' into 'master'

修改打包后的app.config.js代码不压缩

See merge request tian-group/skyeye-admin-fe!18
楼航飞 2 år sedan
förälder
incheckning
dfbc118299
2 ändrade filer med 44 tillägg och 66 borttagningar
  1. 7 7
      build/script/buildConf.ts
  2. 37 59
      src/views/result/success.vue

+ 7 - 7
build/script/buildConf.ts

@@ -20,13 +20,13 @@ function createConfig(
   try {
     const windowConf = `window.${configName}`;
     // Ensure that the variable will not be modified
-    const configStr = `${windowConf}=${JSON.stringify(config)};
-      Object.freeze(${windowConf});
-      Object.defineProperty(window, "${configName}", {
-        configurable: false,
-        writable: false,
-      });
-    `.replace(/\s/g, '');
+    const configStr = `
+${windowConf}=${JSON.stringify(config, null, 2)};
+Object.freeze(${windowConf});
+Object.defineProperty(window, "${configName}", {
+  configurable: false,
+  writable: false,
+});`;
     fs.mkdirp(getRootPath(OUTPUT_DIR));
     writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
 

+ 37 - 59
src/views/result/success.vue

@@ -1,70 +1,48 @@
 <template>
-  <div>
-    <h2> 相机预览 </h2>
-    <div class="cameraMain">
-      <div class="cameraTree">
-        <CameraTree :data="data" v-if="data" />
-      </div>
-      <div class="cameraSettingWrapper">
-        <div class="cameraView">
-          <CameraViewSetting />
+  <el-card :bordered="false" class="proCard">
+    <div class="result-box">
+      <el-result
+        status="success"
+        title="操作成功"
+        description="提交结果页用于反馈一系列操作任务的处理结果,如果仅是简单操作,灰色区域可以显示一些补充的信息。"
+      >
+        <div class="result-box-extra">
+          <p>已提交申请,等待财务部门审核。</p>
         </div>
-        <div class="cameraParamsSettingWrapper">
-          <div class="cameraParamsSetting"> 相机的参数设置 </div>
-          <div class="algorithmsSetting"> <AlgorithmsSetting /> </div>
-        </div>
-      </div>
+        <template #footer>
+          <div class="flex justify-center mb-4">
+            <el-space align="center">
+              <el-button type="info" @click="goHome">回到首页</el-button>
+              <el-button>查看详情</el-button>
+              <el-button>打印</el-button>
+            </el-space>
+          </div>
+        </template>
+      </el-result>
     </div>
-  </div>
+  </el-card>
 </template>
-
 <script lang="ts" setup>
-  import CameraTree from './components/CameraTree/CameraTree.vue';
-  import CameraViewSetting from './components/CameraViewSetting/CameraViewSetting.vue';
-  import AlgorithmsSetting from './components/AlgorithmsSetting/AlgorithmsSetting.vue';
-  import useCameraTree from './hooks/useCameraTree';
-  const { data, loading } = useCameraTree();
-</script>
-<style lang="scss" scoped>
-  .cameraView {
-    width: 800px;
-    // height: 400px;
-    border: 1px solid #ccc;
-  }
+  import { useRouter } from 'vue-router';
 
-  .cameraParamsSetting {
-    width: 350px;
-    min-height: 300px;
-    border: 1px solid #ccc;
-  }
+  const router = useRouter();
 
-  .cameraParamsSetting {
-    width: 350px;
-    min-height: 300px;
-    border: 1px solid #ccc;
-  }
-
-  .algorithmsSetting {
-    flex: 1;
-    border: 1px solid #ccc;
-  }
-  .cameraMain {
-    display: flex;
-    background: #fff;
-  }
-  .cameraTree {
-    width: 250px;
-    height: 800px;
-    border: 1px solid #ccc;
+  function goHome() {
+    router.push('/');
   }
+</script>
+<style lang="scss" scoped>
+  .result-box {
+    width: 72%;
+    margin: 0 auto;
+    text-align: center;
+    padding-top: 5px;
 
-  .cameraParamsSettingWrapper {
-    display: flex;
-    margin-top: 10px;
-  }
-  .algorithmsSetting {
-    flex: 1;
-    min-height: 300px;
-    margin-left: 10px;
+    &-extra {
+      padding: 24px 40px;
+      text-align: left;
+      background: var(--n-border-color);
+      border-radius: 4px;
+    }
   }
 </style>