Przeglądaj źródła

我的任务和全流程管理时间字段需要注意。

DESKTOP-6LTVLN7\Liumouren 2 lat temu
rodzic
commit
6f318f2116

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

@@ -84,7 +84,7 @@ export default {
         c_task_id: "", // 任务id
         c_task_name: "", // 任务名称
         c_associated_item_ids: "", // 关联项目ids
-        c_create_date: "", // 当前时间时间戳
+        c_create_time: "", // 当前时间时间戳
         c_task_description: "", // 任务描述
         c_user_id: "", // 用户id
         c_area_code: "", // 所属街道行政区划编码
@@ -277,7 +277,7 @@ export default {
         if (valid) {
           this.createTaskForm.c_task_id = this.$CryptoJS.buildGuid();
           this.createTaskForm.c_user_id = localStorage.getItem("USER_ID");
-          this.createTaskForm.c_create_date = parseInt(new Date().getTime()/1000)*1000;
+          this.createTaskForm.c_create_time = parseInt(new Date().getTime()/1000)*1000;
           this.createTaskForm.title = this.createTaskForm.c_task_name;
           this.$confirm("您已成功提交任务,请等待管理员审核。", "系统提示", {
             confirmButtonText: "确定",

+ 3 - 3
src/components/common/BottomForm/MyMission.vue

@@ -54,9 +54,9 @@
       <el-table-column type="index" width="50"> </el-table-column>
       <!-- <el-table-column prop="c_task_id" label="任务编号"> </el-table-column> -->
       <el-table-column prop="c_task_name" label="任务名称"> </el-table-column>
-      <el-table-column prop="c_create_date" label="创建时间">
+      <el-table-column prop="c_create_time" label="创建时间">
         <template slot-scope="scope">
-          {{ $dayjs(scope.row.c_create_date).format("YYYY-MM-DD HH:mm:ss") }}
+          {{ $dayjs(scope.row.c_create_time).format("YYYY-MM-DD HH:mm:ss") }}
         </template>
       </el-table-column>
       <el-table-column prop="state" label="状态">
@@ -246,7 +246,7 @@ export default {
           params.append("states", "0,1,2,3");
         }
         params.append("search", JSON.stringify(searchParam));
-        let sortparam = [{ field: "c_create_date", orderByType: 2 }];
+        let sortparam = [{ field: "c_create_time", orderByType: 2 }];
         params.append("orderBy", JSON.stringify(sortparam));
         this.$Post(this.urlsCollection.selectContentList, params).then(
           res => {

+ 20 - 8
src/components/common/BottomForm/UploadingData.vue

@@ -48,6 +48,8 @@ export default {
       filePath: "",
       // 上传文件列表
       fileList: [],
+      // 暂存上传文件数据
+      fileDataList: {},
       // 上传数据弹窗显示状态
       dialogVisible: false
     };
@@ -73,12 +75,20 @@ export default {
     },
     // 弹窗关闭询问
     handleClose() {
-      if (this.dialogVisible) {
+      if (this.dialogVisible && this.fileList.length > 0) {
+        this.$confirm("确认关闭?")
+          .then(_ => {
+            this.clearDialogVisible();
+          })
+          .catch(_ => {});
+      } else {
         this.clearDialogVisible();
       }
     },
     // 上传数据关闭
     clearDialogVisible() {
+      this.fileList = [];
+      this.fileDataList = {};
       // 关闭弹窗
       this.dialogVisible = false;
       // 修改父级菜单变量(弹窗显示状态和显示底部菜单)
@@ -86,6 +96,11 @@ export default {
     },
     // 上传数据表单提交
     subMitDialogVisible() {
+      let fileDataList = this.fileDataList;
+      for (let key in fileDataList) {
+        const dataJson = JSON.parse(fileDataList[key]);
+        this.uploadRENDER(dataJson);
+      }
       setTimeout(() => {
         if (map2DViewer.analysisGroups[`upload_layer_unique`]) {
           this.$message.success("数据上传成功!");
@@ -102,11 +117,11 @@ export default {
     },
     // 文件列表移除文件时
     handleRemove(file, fileList) {
-      console.log("删除数据中移除文件", file, fileList);
+      this.fileList = fileList;
+      delete this.fileDataList[file.uid];
     },
     // 点击文件列表中已上传的文件时
     handlePreview(file) {
-      console.log(file);
     },
     // 文件超出个数限制时
     handleExceed(files, fileList) {
@@ -136,7 +151,6 @@ export default {
           this.$store.state.selectSelectDataMap["singlePolygon"] = [];
         }
         let firstPolygon = JSON.parse(JSON.stringify(geoJson));
-        console.log("上传文件读取到的数据", firstPolygon);
         firstPolygon.features.forEach((ele, index) => {
           let cid = `myLayer_${index}`;
           let geometry = JSON.stringify(ele);
@@ -148,14 +162,12 @@ export default {
     },
     // 读取file对象内容
     getActionData(file) {
-      // console.log();
       const __this = this;
       var reader = new FileReader(); // 新建一个FileReader
       reader.readAsText(file.raw, "UTF-8"); // 读取文件
       reader.onload = function (evt) {
-        //读取文件完毕执行此函数
-        const dataJson = JSON.parse(evt.target.result);
-        __this.uploadRENDER(dataJson);
+        __this.fileList.push(file);
+        __this.fileDataList[file.uid] = evt.target.result;
       };
     },
     // 上传文件之前