diff --git a/src/mixins/view-module.js b/src/mixins/view-module.js
index dcfabd2e..079ac138 100644
--- a/src/mixins/view-module.js
+++ b/src/mixins/view-module.js
@@ -102,14 +102,6 @@ export default {
this.page = 1
this.query()
},
- // 新增 / 修改
- addOrUpdateHandle (id) {
- this.addOrUpdateVisible = true
- this.$nextTick(() => {
- this.$refs.addOrUpdate.dataForm.id = id
- this.$refs.addOrUpdate.init()
- })
- },
// 删除
deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {
diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
index 30096682..feb8b832 100644
--- a/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
+++ b/src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
@@ -96,7 +96,7 @@
- {{ $t("cancel") }}
+ {{ $t("cancel") }}
{{
$t("confirm")
}}
@@ -207,6 +207,9 @@ export default {
this.initMap();
},
methods: {
+ closeSubmit(){
+ this.$emit('closeDialog')
+ },
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义
initMap() {
// 定义地图中心点坐标
diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
index 18e7b785..85bb8543 100644
--- a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
+++ b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue
@@ -6,48 +6,61 @@
:model="dataForm"
@keyup.enter.native="getDataList()"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
- {{ $t("query") }}
+ {{
+ $t("query")
+ }}
- {{
- $t("add")
- }}
+ {{ $t("add") }}
-
-
-
+
+
+
@@ -168,7 +181,7 @@
@@ -199,50 +213,64 @@ export default {
dataForm: {
name: "",
mobile: "",
- orgId: ""
+ orgId: "",
},
- organizationList: [],
- orgIds:[]
+ organizationList: [],
+ orgIds: [],
+ updateId: null,
};
},
components: {
AddOrUpdate,
},
- created(){
- this.getFormInfo()
- },
+ created() {
+ this.getFormInfo();
+ },
methods: {
- // 获取所属组织列表
- getFormInfo() {
- this.$http
- .post(`/gov/org/agency/getOrgTreeListByCustomerId`)
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- }
- this.organizationList = res.data;
- this.deleteChildren(this.organizationList)
- })
- .catch(() => {});
- },
- deleteChildren(arr) {
- let childs = arr
- for (let i = childs.length; i--; i > 0) {
- if (childs[i].children) {
- if (childs[i].children.length) {
- this.deleteChildren(childs[i].children)
- } else {
- delete childs[i].children
- }
- }
- }
- return arr
- },
- orgChangeHandle () {
- this.dataForm.orgId = this.orgIds[this.orgIds.length-1]
- console.log(this.dataForm)
-
- },
+ // 新增 / 修改
+ addOrUpdateHandle(id) {
+ this.updateId = id;
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.dataForm.id = id;
+ this.$refs.addOrUpdate.init();
+ });
+ this.addOrUpdateVisible = true;
+ },
+ // 关闭弹窗
+ closeDialog() {
+ this.addOrUpdateVisible = false;
+ this.uploadId = null;
+ },
+ // 获取所属组织列表
+ getFormInfo() {
+ this.$http
+ .post(`/gov/org/agency/getOrgTreeListByCustomerId`)
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ }
+ this.organizationList = res.data;
+ this.deleteChildren(this.organizationList);
+ })
+ .catch(() => {});
+ },
+ deleteChildren(arr) {
+ let childs = arr;
+ for (let i = childs.length; i--; i > 0) {
+ if (childs[i].children) {
+ if (childs[i].children.length) {
+ this.deleteChildren(childs[i].children);
+ } else {
+ delete childs[i].children;
+ }
+ }
+ }
+ return arr;
+ },
+ orgChangeHandle() {
+ this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
+ console.log(this.dataForm);
+ },
handleExportModule() {
let title = "核酸检测点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
@@ -260,31 +288,30 @@ export default {
}
);
},
- // 下载文件
- download (data, fileName) {
- if (!data) {
- return
- }
-
- var csvData = new Blob([data])
+ // 下载文件
+ download(data, fileName) {
+ if (!data) {
+ return;
+ }
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- window.navigator.msSaveOrOpenBlob(csvData, fileName);
- }
- // for Non-IE (chrome, firefox etc.)
- else {
- var a = document.createElement('a');
- document.body.appendChild(a);
- a.style = 'display: none';
- var url = window.URL.createObjectURL(csvData);
- a.href = url;
- a.download = fileName;
- a.click();
- a.remove();
- window.URL.revokeObjectURL(url);
- }
+ var csvData = new Blob([data]);
- },
+ if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+ window.navigator.msSaveOrOpenBlob(csvData, fileName);
+ }
+ // for Non-IE (chrome, firefox etc.)
+ else {
+ var a = document.createElement("a");
+ document.body.appendChild(a);
+ a.style = "display: none";
+ var url = window.URL.createObjectURL(csvData);
+ a.href = url;
+ a.download = fileName;
+ a.click();
+ a.remove();
+ window.URL.revokeObjectURL(url);
+ }
+ },
// 上传文件之前的钩子
beforeUpload(file) {
this.files = file;
@@ -317,7 +344,7 @@ export default {
});
//清空上传列表
- this.$refs['upload'].clearFiles();
+ this.$refs["upload"].clearFiles();
let url = "";
let fileFormData = new FormData();
@@ -325,7 +352,10 @@ export default {
url = "/epmetuser/icPointNucleicMonitoring/pointImport";
- window.app.ajax.post2(url,fileFormData,(data, rspMsg) => {
+ window.app.ajax.post2(
+ url,
+ fileFormData,
+ (data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
// this.$message.success('导入成功')
} else {
@@ -338,7 +368,6 @@ export default {
// this.$message.error(rspMsg)
}
this.loadTable();
-
},
(rspMsg, data) => {},
{ headers: { "Content-Type": "multipart/form-data" } }
diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
index c0ccdca7..5cfab8d2 100644
--- a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
+++ b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
@@ -253,7 +253,6 @@ export default {
},
},
mounted() {
- console.log(document.getElementById("map_app"));
this.getFormInfo();
this.initMap();
},
diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue
index 35c6621a..4cca565d 100644
--- a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue
+++ b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue
@@ -7,23 +7,36 @@
@keyup.enter.native="getDataList()"
>
-
+
-
+
- {{ $t("query") }}
+ {{
+ $t("query")
+ }}
- {{
- $t("add")
- }}
+ {{ $t("add") }}
-
-
-
+
+
+
@@ -77,10 +90,10 @@
width="50"
>
-
-
-
-
+
+
+
+
@@ -201,15 +215,30 @@ export default {
deleteIsBatch: true,
},
dataForm: {
- name: "",
- mobile: ""
+ name: "",
+ mobile: "",
},
+ updateId: null,
};
},
components: {
AddOrUpdate,
},
methods: {
+ // 新增 / 修改
+ addOrUpdateHandle(id) {
+ this.updateId = id;
+ this.$nextTick(() => {
+ this.$refs.addOrUpdate.dataForm.id = id;
+ this.$refs.addOrUpdate.init();
+ });
+ this.addOrUpdateVisible = true;
+ },
+ // 关闭弹窗
+ closeDialog() {
+ this.addOrUpdateVisible = false;
+ this.uploadId = null;
+ },
handleExportModule() {
let title = "疫苗接种点模板";
let url = "/epmetuser/icPointVaccinesInoculation/exporttemplate";
@@ -227,31 +256,30 @@ export default {
}
);
},
- // 下载文件
- download (data, fileName) {
- if (!data) {
- return
- }
-
- var csvData = new Blob([data])
+ // 下载文件
+ download(data, fileName) {
+ if (!data) {
+ return;
+ }
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- window.navigator.msSaveOrOpenBlob(csvData, fileName);
- }
- // for Non-IE (chrome, firefox etc.)
- else {
- var a = document.createElement('a');
- document.body.appendChild(a);
- a.style = 'display: none';
- var url = window.URL.createObjectURL(csvData);
- a.href = url;
- a.download = fileName;
- a.click();
- a.remove();
- window.URL.revokeObjectURL(url);
- }
+ var csvData = new Blob([data]);
- },
+ if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+ window.navigator.msSaveOrOpenBlob(csvData, fileName);
+ }
+ // for Non-IE (chrome, firefox etc.)
+ else {
+ var a = document.createElement("a");
+ document.body.appendChild(a);
+ a.style = "display: none";
+ var url = window.URL.createObjectURL(csvData);
+ a.href = url;
+ a.download = fileName;
+ a.click();
+ a.remove();
+ window.URL.revokeObjectURL(url);
+ }
+ },
// 上传文件之前的钩子
beforeUpload(file) {
this.files = file;
@@ -271,46 +299,48 @@ export default {
return true;
}
},
- async uploadFile() {
- if (this.fileName == "") {
- this.$message.warning("请选择要上传的文件!");
- return false;
- }
-
- this.$message({
- showClose: true,
- message: "导入中,请到系统管理-导入记录中查看进度",
- duration: 0,
- });
+ async uploadFile() {
+ if (this.fileName == "") {
+ this.$message.warning("请选择要上传的文件!");
+ return false;
+ }
- //清空上传列表
- this.$refs['upload'].clearFiles();
- let url = "";
+ this.$message({
+ showClose: true,
+ message: "导入中,请到系统管理-导入记录中查看进度",
+ duration: 0,
+ });
- let fileFormData = new FormData();
- fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ //清空上传列表
+ this.$refs["upload"].clearFiles();
+ let url = "";
- url = "/epmetuser/icPointVaccinesInoculation/pointImport";
+ let fileFormData = new FormData();
+ fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名
- window.app.ajax.post2(url,fileFormData,(data, rspMsg) => {
- if (data.code === 0 && data.msg == "success") {
- // this.$message.success('导入成功')
- } else {
- // this.$message({
- // showClose: true,
- // message: rspMsg,
- // duration: 0,
- // type: "error"
- // })
- // this.$message.error(rspMsg)
- }
- this.loadTable();
+ url = "/epmetuser/icPointVaccinesInoculation/pointImport";
- },
- (rspMsg, data) => {},
- { headers: { "Content-Type": "multipart/form-data" } }
- );
- }
+ window.app.ajax.post2(
+ url,
+ fileFormData,
+ (data, rspMsg) => {
+ if (data.code === 0 && data.msg == "success") {
+ // this.$message.success('导入成功')
+ } else {
+ // this.$message({
+ // showClose: true,
+ // message: rspMsg,
+ // duration: 0,
+ // type: "error"
+ // })
+ // this.$message.error(rspMsg)
+ }
+ this.loadTable();
+ },
+ (rspMsg, data) => {},
+ { headers: { "Content-Type": "multipart/form-data" } }
+ );
+ },
},
};