内部备注:
{{ item.internalRemark }}
@@ -348,10 +431,12 @@
@@ -397,7 +488,7 @@ import eventInfo from "./event-info";
import projectEvaluation from "./project-evaluation";
import dateFormat from "dai-js/tools/dateFormat";
-function iniData () {
+function iniData() {
return {
pageType: "info",
uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2",
@@ -540,7 +631,7 @@ export default {
data: iniData,
computed: {
- dataRule () {
+ dataRule() {
const {
fmData: { operateType },
} = this;
@@ -583,13 +674,13 @@ export default {
return obj;
},
- styleFullHeight () {
+ styleFullHeight() {
return {
maxHeight: "calc(100vh - 120px)",
};
},
- styleHalfHeight () {
+ styleHalfHeight() {
return {
maxHeight: "calc((100vh - 140px) / 2)",
};
@@ -597,7 +688,7 @@ export default {
},
watch: {
- projectId () {
+ projectId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
@@ -624,7 +715,7 @@ export default {
)["departmentName"];
}
},
- selectedCateData (val) {
+ selectedCateData(val) {
const { cateOptions } = this;
this.projectCate = val
.filter((arr) => arr.length > 0)
@@ -637,7 +728,7 @@ export default {
};
});
},
- async selectedTagData (val) {
+ async selectedTagData(val) {
const { tagOptions } = this;
this.projectTag = await Promise.all(
val.map(async (id) => {
@@ -666,31 +757,51 @@ export default {
},
},
- mounted () {
-
+ mounted() {
console.log(this.projectIdCopy);
this.getApiData();
},
methods: {
- beforeImgUpload (file) {
+ beforeImgUpload(file) {
+ console.log(file);
const isLt1M = file.size / 1024 / 1024 < 10;
+ const srcType = file.type;
+ const format = file.name.split(".").pop();
if (!isLt1M) {
this.$message.error("上传文件大小不能超过 10MB!");
+ return false;
}
- return isLt1M;
+ if (
+ srcType.indexOf("image") == -1 &&
+ srcType.indexOf("video") == -1 &&
+ ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"].indexOf(format) ==
+ -1
+ ) {
+ this.$message.error("文档仅限pdf和office文件!");
+ return false;
+ }
+ return true;
},
- handleImgSuccess (res, file, fileList) {
- console.log("res.data.url", file);
+ handleImgSuccess(res, file, fileList) {
+ console.log("handleImgSuccess", file);
if (res.code === 0 && res.msg === "success") {
- console.log("res.data.url", res.data.url);
+ let format = file.name.split(".").pop();
+ let srcType = file.raw.type;
+ let type = "file";
+ console.log("==============================srcType: ", srcType);
+ if (srcType.indexOf("image") != -1) {
+ type = "image";
+ } else if (srcType.indexOf("video") != -1) {
+ type = "video";
+ }
this.fmData.internalFile.push({
- format: file.name.split(".").pop(),
+ format,
name: file.name,
size: file.size,
- type: file.raw.type,
+ type,
url: res.data.url,
});
console.log(this.fmData.internalFile);
@@ -699,23 +810,25 @@ export default {
}
},
- handleImgRemove (file) {
- let index = this.fmData.internalFile.findIndex(
- (item) => item.url == file.response.data.url
- );
- this.fmData.internalFile.splice(index, 1);
- console.log(this.fmData.internalFile);
+ handleImgRemove(file) {
+ console.log("handleImgRemove", file);
+ if (file.response) {
+ let index = this.fmData.internalFile.findIndex(
+ (item) => item.url == file.response.data.url
+ );
+ this.fmData.internalFile.splice(index, 1);
+ }
},
- watchImg (src) {
+ watchImg(src) {
window.open(src);
},
- handleClose () {
+ handleClose() {
this.$emit("close");
},
- handleSubmit () {
+ handleSubmit() {
this.$refs["fm"].validate((valid, messageObj) => {
if (valid) {
this.beforeSubmit();
@@ -724,7 +837,7 @@ export default {
});
},
- beforeSubmit () {
+ beforeSubmit() {
const {
fmData: { operateType },
} = this;
@@ -741,15 +854,15 @@ export default {
}
},
- handleWatchOrigin () {
+ handleWatchOrigin() {
this.pageType = "origin-info";
},
- handleBackInfo () {
+ handleBackInfo() {
this.pageType = "info";
},
//加载组织数据
- async submitBack () {
+ async submitBack() {
const url = "/gov/project/trace/return-v2";
const { fmData } = this;
@@ -780,7 +893,7 @@ export default {
},
//加载组织数据
- async submitClose () {
+ async submitClose() {
const url = "/gov/project/trace/closeproject-v2";
const { fmData } = this;
@@ -811,7 +924,7 @@ export default {
},
//加载组织数据
- async submitTurn () {
+ async submitTurn() {
const url = "/gov/project/trace/transfer-v2";
const { fmData } = this;
@@ -843,7 +956,7 @@ export default {
},
//加载组织数据
- async submitDispose () {
+ async submitDispose() {
const url = "/gov/project/trace/response-v2";
const { fmData } = this;
@@ -874,14 +987,14 @@ export default {
}
},
- async getApiData () {
+ async getApiData() {
await this.getProjectInfo();
this.getProjectCate();
this.getProjectProcess();
},
//加载组织数据
- async getProjectInfo () {
+ async getProjectInfo() {
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
@@ -903,7 +1016,7 @@ export default {
},
//加载组织数据
- async getReturnableList () {
+ async getReturnableList() {
const url = "/gov/project/trace/returnablelist";
const { data, code, msg } = await requestPost(url, {
@@ -918,7 +1031,7 @@ export default {
},
//加载组织数据
- async getMyDepartmentList () {
+ async getMyDepartmentList() {
const url = "/gov/project/trace/mydepartmentlist";
const { data, code, msg } = await requestPost(url, {
@@ -927,13 +1040,16 @@ export default {
if (code === 0) {
this.myDepartmentList = data;
+ if (data.length == 1) {
+ this.fmData.projectStaffId = data[0].projectStaffId;
+ }
} else {
this.$message.error(msg);
}
},
//加载组织数据
- async getAssistanceUnitList () {
+ async getAssistanceUnitList() {
const url = "/heart/icpartyunit/assistanceUnitList";
const { data, code, msg } = await requestPost(url, {
@@ -948,7 +1064,7 @@ export default {
},
//加载组织数据
- async getIssueInfo () {
+ async getIssueInfo() {
const url = "/resi/hall/issue/detail";
const { data, code, msg } = await requestPost(url, {
@@ -963,7 +1079,7 @@ export default {
},
//加载组织数据
- async getIssueTrend () {
+ async getIssueTrend() {
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {
@@ -996,7 +1112,7 @@ export default {
},
//加载组织数据
- async getEventInfo () {
+ async getEventInfo() {
const url = "/gov/project/resievent/eventdetail-icdata";
const { data, code, msg } = await requestPost(url, {
@@ -1017,7 +1133,7 @@ export default {
},
//加载组织数据
- async getProjectProcess () {
+ async getProjectProcess() {
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
@@ -1037,7 +1153,7 @@ export default {
}
},
- async getProjectCate () {
+ async getProjectCate() {
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
@@ -1056,7 +1172,7 @@ export default {
}
},
- async getCateOptions () {
+ async getCateOptions() {
const url = "/gov/issue/issueprojectcategorydict/list";
const { data, code, msg } = await requestPost(url, {});
@@ -1073,7 +1189,7 @@ export default {
}
},
- async updateProjectCate () {
+ async updateProjectCate() {
const url = "/gov/project/projectcategory/save";
const { projectCate } = this;
if (projectCate.length == 0) {
@@ -1094,11 +1210,11 @@ export default {
}
},
- handleTagChange (val) {
+ handleTagChange(val) {
console.log(val);
},
- async createTag (tagName) {
+ async createTag(tagName) {
const url = "/gov/issue/issuetags/add";
const { data, code, msg } = await requestPost(url, {
@@ -1115,7 +1231,7 @@ export default {
}
},
- async getTagOptions () {
+ async getTagOptions() {
const url = "/gov/issue/issueprojecttagdict/list";
const { data, code, msg } = await requestPost(url, {
@@ -1133,7 +1249,7 @@ export default {
}
},
- async updateProjectTag () {
+ async updateProjectTag() {
const url = "/gov/project/projecttags/save";
const { projectTag } = this;
@@ -1150,13 +1266,13 @@ export default {
}
},
- toUserInfo (item) {
+ toUserInfo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
- toProjectInfo (item) {
+ toProjectInfo(item) {
console.log(item);
this.projectIdCopy = item.projectId;
// let data = iniData();
diff --git a/src/views/modules/shequzhili/xiangmu/index.vue b/src/views/modules/shequzhili/xiangmu/index.vue
index 02fdb025b..cac709380 100644
--- a/src/views/modules/shequzhili/xiangmu/index.vue
+++ b/src/views/modules/shequzhili/xiangmu/index.vue
@@ -470,7 +470,7 @@ export default {
},
async handleChu() {
- const url = "/epmetuser/icBirthRecord/export";
+ const url = "/gov/project/project/project-list-export";
const { pageSize, pageNo, fmData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue
index bf12af804..c304c20cf 100644
--- a/src/views/modules/visual/basicinfo/basicInfoMain.vue
+++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue
@@ -172,6 +172,9 @@ let iconSource; // icon
let polygonSource;//变电站标注多边形
let select;//选中标注
+let xoffset = 0.0051
+let yoffset = 0.0002
+
//url图标
@@ -629,10 +632,14 @@ const vueGis = {
let polygonArray = []//整个多边形的[[lon,lat],[lon,lat],[lon,lat]]数组
coorArray.forEach((item, index) => {
- itemArray.push(item)
- if (index % 2 == 0) {//偶
+ if (index % 2 == 0) {//偶
+ item = (parseFloat(item) + xoffset) + ''
+ itemArray.push(item)
} else {//奇
+ item = (parseFloat(item) + yoffset) + ''
+ itemArray.push(item)
+
polygonArray.push(itemArray)
itemArray = []
}
@@ -694,10 +701,15 @@ const vueGis = {
let polygonArray = []//整个多边形的[[lon,lat],[lon,lat],[lon,lat]]数组
coorArray.forEach((item, index) => {
- itemArray.push(item)
+ // itemArray.push(item)
if (index % 2 == 0) {//偶
+ item = (parseFloat(item) + xoffset) + ''
+ itemArray.push(item)
} else {//奇
+
+ item = (parseFloat(item) + yoffset) + ''
+ itemArray.push(item)
polygonArray.push(itemArray)
itemArray = []
}
@@ -715,6 +727,8 @@ const vueGis = {
'features': featureData
};
let feature = (new GeoJSON()).readFeatures(geojsonObject)
+ console.log(geojsonObject)
+
polygonSource.addFeatures(feature)
let iconFeatures = [];