diff --git a/src/views/modules/cpts/base/cpts/edit.vue b/src/views/modules/cpts/base/cpts/edit.vue
index ec6637bc..47bbf6b4 100644
--- a/src/views/modules/cpts/base/cpts/edit.vue
+++ b/src/views/modules/cpts/base/cpts/edit.vue
@@ -7,134 +7,265 @@
:model="fmData"
:inline="true"
:disabled="formType === 'watch'"
- class="form"
+ class="m-fm"
+ :class="editParamsDiv ? 'z-div' : ''"
>
-
-
-
-
-
-
- {{ fmData[item.keyName] || "--" }}
-
-
-
-
-
-
-
-
- {{ fmData[item.keyName] || "--" }}
-
-
-
-
-
-
- ({{ item.unitName }})
-
-
-
-
-
+
+
+
-
-
-
+
-
-
+
+ {{ fmData[item.keyName] || "--" }}
+
+
+
+
-
+ {{ fmData[item.keyName] || "--" }}
+
+
+
+
+
+
+ ({{ item.unitName }})
+
+
+
+ 查询
-
-
-
经度
+
+
+
+
+
+
+
-
纬度
+
查询
+
+
+ 经度
+
+
+ 纬度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ fmData[item.keyName] || "--" }}
+
+
+
+
+
+
+
+
+ {{ fmData[item.keyName] || "--" }}
+
+
+
+
+
+
+ ({{ item.unitName }})
+
+
+
+
+
+
+
+
+
+
+
+
查询
+
+
+ 经度
+
+
+ 纬度
+
+
+
-
-
-
+
+
+
+
+
@@ -197,6 +328,16 @@ export default {
type: Array,
default: () => [],
},
+ editFixedParams: {
+ type: Object,
+ default: () => {
+ return {};
+ },
+ },
+ editParamsDiv: {
+ type: Number,
+ default: 0,
+ },
},
data() {
@@ -206,6 +347,9 @@ export default {
btnDisable: false,
fmData: {},
+
+ editParams1: [],
+ editParams2: [],
};
},
components: {},
@@ -237,7 +381,7 @@ export default {
},
iniFmData() {
- const { editParams, fmData } = this;
+ const { editParams, fmData, editParamsDiv } = this;
editParams.forEach((item, index) => {
fmData[item.keyName] = item.value || "";
if (item.supValues) {
@@ -256,13 +400,19 @@ export default {
}
} else if (item.type == "address") {
this.$nextTick(async () => {
- await nextTick(500);
+ await nextTick(300);
this.initMap(item);
});
}
});
this.fmData = { ...fmData };
+ if (editParamsDiv) {
+ this.editParams1 = editParams.slice(0, editParamsDiv);
+ this.editParams2 = editParams.slice(editParamsDiv);
+ } else {
+ this.editParams1 = editParams;
+ }
console.log("------------------------------------", this.fmData);
this.iniLoaded = true;
},
@@ -302,8 +452,8 @@ export default {
geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类
// 监听地图平移结束
- map.on("panend", () => {
- this.handleMoveCenter(item);
+ map.on("panend", (e) => {
+ this.handleMoveCenter(item, e);
});
this.handleMoveCenter(item);
},
@@ -352,7 +502,8 @@ export default {
});
},
- handleMoveCenter(item) {
+ handleMoveCenter(item, e) {
+ console.log(e);
//修改地图中心点
const center = map.getCenter();
const lat = center.getLat();
@@ -363,20 +514,26 @@ export default {
this.fmData[item.supKeys[1]] = lat;
this.setMarker(lat, lng);
- geocoder
- .getAddress({ location: new TMap.LatLng(lat, lng) }) // 将给定的坐标位置转换为地址
- .then((result) => {
- this.fmData[item.keyName] = result.result.address;
- });
+ if (e && e.originalEvent) {
+ geocoder
+ .getAddress({ location: new TMap.LatLng(lat, lng) }) // 将给定的坐标位置转换为地址
+ .then((result) => {
+ this.fmData[item.keyName] = result.result.address;
+ });
+ }
},
async getInfo() {
- const url = this.infoUrl;
+ let url = this.infoUrl;
if (!url) return;
- const { idName } = this;
+ const { idName, formId } = this;
+
+ if (url.endsWith("/")) {
+ url += formId;
+ }
const params = {
- [idName]: this.formId,
+ [idName]: formId,
};
const { data, code, msg } = await requestPost(url, params);
@@ -387,6 +544,7 @@ export default {
};
console.log("------------------------------------info", this.fmData);
+ await nextTick(800);
if (map) {
map.setCenter(new TMap.LatLng(data.latitude, data.longitude));
}
@@ -419,6 +577,7 @@ export default {
let url = "";
let params = {
...this.fmData,
+ ...this.editFixedParams,
// serviceType: this.fmData.serviceTypeArr.join(","),
};
@@ -451,39 +610,57 @@ export default {
diff --git a/src/views/modules/cpts/base/index.vue b/src/views/modules/cpts/base/index.vue
index e3fe202b..3f78f374 100644
--- a/src/views/modules/cpts/base/index.vue
+++ b/src/views/modules/cpts/base/index.vue
@@ -30,7 +30,7 @@
>
@@ -148,15 +148,15 @@
>查看
编辑{{ editBtnName(scope.row) }}
+ >
+
+
+
+
@@ -275,10 +286,33 @@ export default {
default: "",
},
+ editAuth: {
+ type: Function,
+ default: () => true,
+ },
+ editBtnName: {
+ type: Function,
+ default: () => "编辑",
+ },
+ delAuth: {
+ type: Function,
+ default: () => true,
+ },
+
editParams: {
type: Array,
default: () => [],
},
+ editFixedParams: {
+ type: Object,
+ default: () => {
+ return {};
+ },
+ },
+ editParamsDiv: {
+ type: Number,
+ default: 0,
+ },
idName: {
type: String,
@@ -495,7 +529,7 @@ export default {
const { idName } = this;
this.formType = "edit";
this.formId = row[idName];
- this.formTitle = "编辑";
+ this.formTitle = "修改";
this.formShow = true;
},
diff --git a/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/edit.vue b/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/edit.vue
deleted file mode 100644
index 3b1d06b8..00000000
--- a/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/edit.vue
+++ /dev/null
@@ -1,531 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
- 添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
查询
-
-
- 经度
-
-
- 纬度
-
-
-
-
-
-
-
-
-
-
-
-
- 取 消
- 确 定
-
-
-
-
-
-
-
diff --git a/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue b/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue
new file mode 100644
index 00000000..6d681bd8
--- /dev/null
+++ b/src/views/modules/shequzhili/tuceng/anquan/xuncha/cpts/record.vue
@@ -0,0 +1,536 @@
+
+
+
巡查记录
+
+ 新增
+
+
+
+
+
+
+
+
+
+ {{ scope.row.patrolTime }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.staffName }}
+
+
+
+
+
+
+ {{ scope.row.mobile }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.resultName }}
+
+
+
+
+
+
+ {{ scope.row.detailed }}
+
+
+
+
+
+
+
+ 最多三张图片
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.patrolTime }}
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue b/src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
index 0ae26f55..6f088b43 100644
--- a/src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
+++ b/src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
@@ -8,19 +8,30 @@
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
+ :editAuth="editAuth"
+ :delAuth="delAuth"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
+ :editFixedParams="editFixedParams"
+ :editParamsDiv="5"
+ :editBtnName="(item) => (item.sourceType == 'import' ? '待完善' : '修改')"
idName="enterpriseId"
- >
+ >
+
+
+
+