Browse Source

新增地图插件

tengmingxue 2 years ago
parent
commit
388d6716e1

File diff suppressed because it is too large
+ 107 - 97
public/config.js


+ 44 - 0
src/views/zhpt/common/esriLoaderAPI.js

@@ -0,0 +1,44 @@
+/*
+ * @Author: tengmingxue 1473375109@qq.com
+ * @Date: 2022-09-27 15:48:13
+ * @LastEditors: tengmingxue 1473375109@qq.com
+ * @LastEditTime: 2022-09-27 15:49:07
+ * @FilePath: \zmProjectManagement\src\views\zhpt\common\esriLoaderAPI.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import esriLoader from 'esri-loader';
+ 
+window.apiRoot = 'https://js.arcgis.com/4.17/'; //可以写在项目的配置文件里
+//可以写在项目的配置文件里
+window.dojoConfig = {
+  async: true,
+ 
+  // for jsapi ver. >= 4.9 兼容浏览器
+  deps: ['@dojo/framework/shim/main'],
+ 
+  // for jsapi ver. <= 4.8
+  // deps: ['@dojo/shim/main'],
+  packages: [
+    // {
+    //   name: 'sample',
+    //   location: 'sample/demo'
+        // },
+  ],
+  has: {
+    'esri-promise-compatibility': 1, // Use native Promises by default
+    'esri-featurelayer-webgl': 1, // Enable FeatureLayer WebGL capabilities
+  }
+};
+ 
+function configEsriLoader() {
+  esriLoader.utils.Promise = Promise;
+    
+}
+ 
+export function load(modules) {
+  configEsriLoader();
+  return esriLoader.loadModules(modules, {
+    dojoConfig: window.dojoConfig,
+    url: window.apiRoot,
+  });
+}

File diff suppressed because it is too large
+ 366 - 195
src/views/zhpt/common/tfMap.vue


File diff suppressed because it is too large
+ 227 - 0
src/views/zhpt/common/tfMap_b.vue


+ 5 - 2
src/views/zhpt/projectManager/newInstall/subFlowInfo/index.vue

@@ -12,7 +12,9 @@
           <editAndlook v-if="infoConfig.compentList" :config="infoConfig" v-model="pageSate"></editAndlook>
         </el-tab-pane>
         <el-tab-pane label="流程信息" name="flowInfo"> </el-tab-pane>
-        <el-tab-pane label="工程位置" name="proPos"> </el-tab-pane>
+        <el-tab-pane label="工程位置" name="proPos">
+          <tf-map ref="tfMap" style="width:100%;height:700px;"></tf-map>
+        </el-tab-pane>
       </el-tabs>
     </el-dialog>
   </div>
@@ -22,9 +24,10 @@
 import editAndlook from "./editAndlook.vue";
 import loadComps from "./loadComps.js";
 import {getFlowInfoById} from "@/api/flowInfo";
+import TfMap from "@/views/zhpt/common/tfMap.vue"
 export default {
   name: "subFlowInfo",
-  components: { editAndlook },
+  components: { editAndlook, TfMap },
   props: {
     config: {
         isEdit: false, //操作还是编辑

+ 59 - 54
src/views/zhpt/projectManager/newInstall/userPayment/addUserSettle/index.vue

@@ -3,23 +3,22 @@
     class="pageContentDiv"
     style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px"
   >
-    <el-row class="searchDiv" ref="searchDiv">
-      <searchCom v-model="searchCom"></searchCom>
+    <el-row class="searchDiv" ref="searchDiv" style="padding: 0 10px;">
+      <searchCom v-model="searchCom" :inConfig="searchComConfig"></searchCom>
       <selectList
         :config="userTypeConfig"
         v-model="search.userType"
       ></selectList>
-      <timeSelect v-model="timeSelect" title="签约日期"></timeSelect>
       <selectList
         :config="proNatureConfig"
         v-model="search.settleMethod"
       ></selectList>
-      <selectList :config="stateConfig" v-model="search.state"></selectList>
-      <el-button type="primary" size="small" @click="searchData"
-        >搜索</el-button
-      >
-      <el-button type="primary" size="small" @click="addData">添加</el-button>
-      <!-- <el-button type="primary" size="small" @click="lookInfo">详情</el-button> -->
+      <timeSelect v-model="timeSelect" title="签约日期"></timeSelect>
+      <selectList :config="stateConfig" v-model="search.contractTime"></selectList>
+      <timeSelect v-model="search.startTime" title="发起时间"></timeSelect>
+      <selectList :config="dataViewConfig" v-model="search.dataView"></selectList>
+      <el-button type="primary" size="small" @click="searchData">搜索</el-button>
+      <el-button type="primary" size="small" @click="lookInfo" style="background:#E6A23C;border-color:#E6A23C;">工程概览</el-button>
     </el-row>
     <div
       :style="
@@ -48,11 +47,10 @@ import timeSelect from "@/components/projectCom/timeSelect/index.vue";
 import selectList from "@/components/projectCom/select/index.vue";
 import tableCom from "@/components/projectCom/table/index.vue";
 import inputCom from "@/components/projectCom/input/index.vue";
-import { xjTypeQuery } from "@/api/xjConfigManageApi";
 import commonMe from "@/utils/common.js";
-// import subFlowInfo from "@/views/zhpt/projectManager/newInstall/subFlowInfo/index.vue";
 import detailPage from "./detailPage.vue";
 import inputPage from "./inputPage.vue";
+import {getFlowPage } from "@/api/flowInfo";
 export default {
   name: "addUserSettle",
   components: {
@@ -79,22 +77,25 @@ export default {
       timeSelect: [],
       title: "",
       searchCom: {},
+      searchComConfig:{
+        showTime:false,
+        showDataConfig:false,
+        showState:false,
+        showUserType:false,
+        timeLabel:"发起时间"
+      },
       search: {
-        //查询条件(除开翻页以外的其它查询条件)
         userType: null, //用户类型
-        state: "", //工程状态
-        proNature: "", //工程性质
+        settleMethod:null, //结算类型
+        contractTime: [], //签约日期
+        startTime: [],  //发起时间
+        dataView: "1", //数据查看
       },
       flowShow: false, //输入页面显示控制
       userTypeConfig: {
         //用户类型下拉框配置
         // multiple:true,//是否多选
         label: "用户类型",
-        // searchData:{//查询条件
-        //   current:1,
-        //   size:1000
-        // },
-        // method:e=>{},//获取数据的方法
         data: [
           {
             id: "1",
@@ -113,10 +114,6 @@ export default {
       proNatureConfig: {
         // multiple:true,//是否多选
         label: "结算类型",
-        // searchData:{//查询条件
-        //   current:1,
-        //   size:1000
-        // },
         // method:e=>{},//获取数据的方法
         data: [], //下拉数据
         field: {
@@ -127,10 +124,6 @@ export default {
       stateConfig: {
         // multiple:true,//是否多选
         label: "流程状态",
-        // searchData:{//查询条件
-        //   current:1,
-        //   size:1000
-        // },
         // method:e=>{},//获取数据的方法
         data: [], //下拉数据
         field: {
@@ -138,40 +131,58 @@ export default {
           label: "label", //label的字段
         },
       },
+      dataViewConfig: {
+        // multiple:true,//是否多选
+        label: "数据查看",
+        data: [
+          {
+            id:'1',
+            label:"本人",
+          },
+          {
+            id:'2',
+            label:"全部",
+          }
+        ], //下拉数据
+        field: {
+          id: "id", //id代表的字段
+          label: "label", //label的字段
+        },
+      },
       tableInfo: {}, //table相关的一些信息,如当前选择的行数,当前双击的信息等
       tableConfig: {
         check: true, //是否展示选中框
-        testData: true, //是否使用测试数据
+        testData: false, //是否使用测试数据
         index: true, //是否展示序号
         fieldList: [
           //对应的字段列表
           {
             label: "工程编号", //表头显示
-            field: "proNum", //对应的字段
+            field: "processNumber", //对应的字段
           },
           {
             label: "工程名称", //表头显示
-            field: "proName", //对应的字段
+            field: "projectName", //对应的字段
           },
           {
             label: "工程地址", //表头显示
-            field: "address", //对应的字段
+            field: "addre", //对应的字段
           },
           {
             label: "用户类型", //表头显示
-            field: "userType", //对应的字段
+            field: "userTypeName", //对应的字段
           },
           {
             label: "项目负责人", //表头显示
             field: "prejPerson", //对应的字段
           },
           {
-            label: "结算类型", //表头显示
-            field: "settleMethod", //对应的字段
+            label: "结算类型", //表头显示 
+            field: "settleMethod", //对应的字段    --对接字段
           },
           {
             label: "缴费说明", //表头显示
-            field: "settleNote", //对应的字段
+            field: "settleNote", //对应的字段  --对接字段
           },
           {
             label: "预付款(元)", //表头显示
@@ -212,24 +223,16 @@ export default {
           },
           {
             label: "流程状态", //表头显示
-            field: "state", //对应的字段
+            field: "nodestatename", //对应的字段
             setCellClassMethod: (e) => {
               //通过设置cell的类名来改变cell的显示
-              const value = e.row[e.column["property"]];
-              if (e.rowIndex % 4 == 0) {
-                return "notCom";
-              } else if (e.rowIndex % 4 == 1) {
-                return "wait"; //待发起
-              } else if (e.rowIndex % 4 == 2) {
-                return "inHand"; //处理中
-              } else {
-                return "finished";
-              }
+              const value = e.row['nodeState'];
+              return commonMe.getStateInfo(value);
             },
           },
           {
             label: "所属公司", //表头显示
-            field: "company", //对应的字段
+            field: "tenantName", //对应的字段
           },
           {
             label: "发起部门", //表头显示
@@ -237,11 +240,11 @@ export default {
           },
           {
             label: "发起人", //表头显示
-            field: "creatUser", //对应的字段
+            field: "registerStaffName", //对应的字段
           },
           {
             label: "发起时间", //表头显示
-            field: "creatTime", //对应的字段
+            field: "registerTime", //对应的字段
           },
         ],
         actionList: [
@@ -271,10 +274,7 @@ export default {
   },
   mounted: function () {
     this.getTableHeight();
-    // window.resize(e=>{
-    //   debugger
-    //   this.getTableHeight();
-    // })
+    
   },
   created() {
     this.config.subflowName = this.$options.name;
@@ -292,9 +292,14 @@ export default {
      * @param pageInfo 翻页的数据
      */
     tableChage(pageInfo) {
+      const searchInfo = commonMe.notJsonCopy(Object.assign(this.searchCom, this.search));
       const searchData = commonMe.notJsonCopy(this.search);
       searchData.size = pageInfo.size;
       searchData.current = pageInfo.current;
+      searchData.dto={
+        id:15,
+        map:{}   //searchInfo
+      };
       return this.getData(searchData);
     },
 
@@ -304,7 +309,7 @@ export default {
      */
     getData(searchData) {
       return new Promise((resolve, reject) => {
-        xjTypeQuery(searchData)
+        getFlowPage(searchData)
           .then((res) => {
             resolve({
               records: res.data.records || [],