فهرست منبع

系统优化。

DESKTOP-6LTVLN7\Liumouren 2 سال پیش
والد
کامیت
c92cae6ebb

+ 2 - 2
src/components/common/BottomForm/CreateTaskForm.vue

@@ -79,7 +79,7 @@ export default {
       dialogVisible: false,
       // 新建任务form表单
       createTaskForm: {
-        title: "智慧审计平台",
+        title: "",
         content: "申请任务",
         c_task_id: "", // 任务id
         c_task_name: "", // 任务名称
@@ -278,7 +278,7 @@ export default {
           this.createTaskForm.c_task_id = this.$CryptoJS.buildGuid();
           this.createTaskForm.c_user_id = localStorage.getItem("USER_ID");
           this.createTaskForm.c_create_time = parseInt(new Date().getTime()/1000)*1000;
-          console.log("申请任务提交表单内容:", this.createTaskForm);
+          this.createTaskForm.ttile = this.createTaskForm.c_task_name;
           this.$confirm("您已成功提交任务,请等待管理员审核。", "系统提示", {
             confirmButtonText: "确定",
             cancelButtonText: "撤回",

+ 0 - 2
src/components/common/WholeProcessManagement.vue

@@ -148,13 +148,11 @@ export default {
     },
     // 切换条数
     handleSizeChange(val) {
-      console.log(`每页 ${val} 条`);
       this.paginationData.pageSize = val;
       this.onSubmit();
     },
     //   切换页
     handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
       this.paginationData.currentPage = val;
       this.onSubmit();
     },

+ 44 - 2
src/components/layout/Header.vue

@@ -3,7 +3,10 @@
     <el-row>
       <el-col :span="8" v-if="$store.state.windowsSize.width >= 1300" class="logoBox">
         <div class="logo"></div>
-        <div class="title">浦东新区资源环境智慧审计平台 <span class="title_version">Version:20221216_T_1.0.1</span></div>
+        <div class="title">
+          {{ systemInfo.c_system_name ? systemInfo.c_system_name : "浦东新区资源环境智慧审计平台" }}
+          <span class="title_version">Version:{{ systemInfo.c_version ? systemInfo.c_version : "版本信息获取失败!" }}</span>
+        </div>
       </el-col>
       <el-col :span="2" v-if="$store.state.windowsSize.width < 1300" class="logoBox">
         <div class="logo"></div>
@@ -89,6 +92,7 @@ export default {
   name: "Header",
   data() {
     return {
+      systemInfo: {},
       userName: localStorage.getItem("_USER_NAME") ? localStorage.getItem("_USER_NAME") : "未登录",
       ActiveIndex: "0",
       navData: {
@@ -109,8 +113,47 @@ export default {
   },
   mounted() {
     this.getActiveIndex(true);
+    // 验证是否存在版本更新
+    this.getSystemInfo();
   },
   methods: {
+    // 请求系统信息
+    getSystemInfo() {
+      let params = new FormData();
+      params.append("columnId", "83");
+      params.append("states", "2,3");
+      params.append("pageSize", 10);
+      params.append("page", 0);
+      let sortparam = [{ field: "c_publish_time", orderByType: 2 }];
+      params.append("orderBy", JSON.stringify(sortparam));
+      this.$Post(this.urlsCollection.selectContentList, params).then(
+        res => {
+          if (res.code === 200 && res.content.data.length > 0) {
+            let tableData = res.content.data;
+            if (tableData.length > 0) {
+              this.systemInfo = tableData[0];
+              let systemVersion = localStorage.getItem("SYSTEM_VERSION");
+              if (systemVersion) {
+                if (systemVersion != this.systemInfo.c_version) {
+                  this.$message.success("新版本已发布!自动更新中!");
+                  localStorage.setItem("SYSTEM_VERSION", this.systemInfo.c_version);
+                  window.location.reload();
+                }
+              } else {
+                localStorage.setItem("SYSTEM_VERSION", this.systemInfo.c_version);
+              }
+            }
+          } else {
+            this.systemInfo = {};
+            this.$message.error(res.message);
+          }
+        },
+        error => {
+          this.systemInfo = {};
+          this.$message.error(error);
+        }
+      );
+    },
     // 菜单选择记忆(由于不使用路由,为了防止用户刷新页面后页面丢失,故保存并重新赋值当前页)
     getActiveIndex(status) {
       let _ActiveIndex = "";
@@ -161,7 +204,6 @@ export default {
     },
     // 用户菜单
     handleCommand(command) {
-      console.log(command);
       switch (command) {
         case "loginOut":
           this.loginOut();

+ 0 - 1
src/views/Login.vue

@@ -123,7 +123,6 @@ export default {
       param.append("userName", this.userName);
       param.append("password", this.password);
       param.append("clientId", "1");
-      console.log(param, "paramdata");
       this.$Post(this.urlsCollection.loginUrl, param).then(
         res => {
           // 登录成功