Quellcode durchsuchen

智慧选址、合规性分析项目名称去掉空格个横杠

maxiaoxiao vor 11 Monaten
Ursprung
Commit
0dec1817dd

+ 1 - 1
src/views/complianceAnalysis/components/hgxsc.vue

@@ -120,7 +120,7 @@ export default {
   methods: {
     initform() {
       this.ruleForm.xmmc = `合规_${moment(new Date()).format(
-        "YYYY-MM-DD-HH-mm-ss"
+        "YYYYMMDDHHmmss"
       )}`;
       this.ruleForm.xmlx = `项目类型`;
       this.ruleForm.jsdw = `建设单位`;

+ 11 - 9
src/views/siteselection/components/fzxz.vue

@@ -144,6 +144,7 @@ import {
   GetTemplateFactorList,
 } from "../../../api/ghss/ghxz.js";
 import hgxfx from "../../../../static/data/ghss/data.js";
+import moment from "moment";
 export default {
   components: {
     yxyzPop,
@@ -269,6 +270,7 @@ export default {
       );
     },
     getCurrentDateTime() {
+      return moment(new Date()).format("YYYYMMDDHHmmss");
       const now = new Date();
       const year = now.getFullYear();
       const month = this.padNumber(now.getMonth() + 1); // 月份是从0开始的
@@ -338,7 +340,7 @@ export default {
       //更新范围
       var _temp = this.$refs.range.getRange();
       // this.ruleForm.xzfw = _temp.xzfw;
-      this.ruleForm.xzmj = _temp.xzmj || hgxfx.xzmj;
+      this.ruleForm.xzmj = _temp.xzmj;
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
           let obj = {
@@ -365,14 +367,14 @@ export default {
           });
           AddFzxz(obj).then((res) => {
             // setTimeout(() => {
-              loading.close();
-              this.activeTabs = "lsju";
-              this.$emit("updateParent", "activeTabs", "lsju");
-              this.$message({
-                message: res.message,
-                type: res.success ? "success" : "warning",
-              });
-              this.reset();
+            loading.close();
+            this.activeTabs = "lsju";
+            this.$emit("updateParent", "activeTabs", "lsju");
+            this.$message({
+              message: res.message,
+              type: res.success ? "success" : "warning",
+            });
+            this.reset();
             // }, 2000);
             // }
           });