From 948c5c443d8727c432e3a8120ffc163a97f5cac6 Mon Sep 17 00:00:00 2001
From: gongdi <410827992@qq.com>
Date: Wed, 11 May 2022 17:28:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B4=8B=E6=B5=A6=E5=AD=A6=E6=A0=A1=20?=
=?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/importExcel/importExcel.vue | 3 +
.../servicePlatform/interConfig.js | 25 +++++++++
.../moralEducation/physicalInfo.vue | 2 +-
.../moralEducation/physicalList.vue | 27 +++++++++
.../moralEducation/visionInfo.vue | 6 --
.../moralEducation/visionList.vue | 55 ++++++++++++++++++-
6 files changed, 109 insertions(+), 9 deletions(-)
diff --git a/src/components/common/importExcel/importExcel.vue b/src/components/common/importExcel/importExcel.vue
index c0b77c9..eaaa33e 100644
--- a/src/components/common/importExcel/importExcel.vue
+++ b/src/components/common/importExcel/importExcel.vue
@@ -16,6 +16,9 @@
+
+ "注意:导入成功后将覆盖已有数据"
+
{{"*"+tips}}
diff --git a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/interConfig.js b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/interConfig.js
index 2ce823e..3246a41 100644
--- a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/interConfig.js
+++ b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/interConfig.js
@@ -1488,5 +1488,30 @@ const InterfaceConfig = {
isTestLogin: true,
},
+ /*
+ * 导入体质监测模板数据(覆盖原数据)(java)
+ * "file":" 必填 Excel文件(xls、xlsx)"
+ "person_id":"必填 int 操作人ID"
+ "identity_id":"必填 int 操作人身份ID"
+ "bureau_id":"必填 int 机构ID"
+ * */
+ "importPhysicalData":{
+ url: 'intellioa/java/center/importPhysicalData',
+ method: 'post',
+ isTestLogin: true,
+ },
+
+ /*
+ * 导入近视眼监控模板数据(覆盖原数据)(java)
+ * "file":" 必填 Excel文件(xls、xlsx)"
+ "person_id":"必填 int 操作人ID"
+ "identity_id":"必填 int 操作人身份ID"
+ "bureau_id":"必填 int 机构ID"
+ * */
+ "importVisionData":{
+ url: 'intellioa/java/center/importVisionData',
+ method: 'post',
+ isTestLogin: true,
+ },
};
export default InterfaceConfig;
diff --git a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalInfo.vue b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalInfo.vue
index 37c027d..c541c6f 100644
--- a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalInfo.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalInfo.vue
@@ -55,6 +55,7 @@
} from 'ant-design-vue';
import InterConfig from '../interConfig';
export default{
+ name: "physicalInfo",
props: {
monitorId: {
type: String,
@@ -64,7 +65,6 @@
data(){
return {
pageLoading: false,
- locale,
stageName: "",
gradeName: "",
className: "",
diff --git a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalList.vue b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalList.vue
index 1718b66..5a848be 100644
--- a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalList.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/physicalList.vue
@@ -53,6 +53,7 @@
import {Table, Button, Select, Modal, Divider, Cascader, Icon, Input, Pagination} from 'ant-design-vue';
import PhysicalInfo from './physicalInfo.vue';
import ImportExcel from '../../../../../../components/common/importExcel/importExcel.vue';
+ import axios from 'axios';
const tableColumn = [
{
dataIndex: 'index',
@@ -205,7 +206,33 @@
},
//开始导入
startImport:function (file) {
+ var formDatas = new FormData();
+ formDatas.append("file", file);
+ this.showImport = false;
this.loading = true;
+ let url = this.BaseConfig._action_path+"/dsideal_yy/ypt/intellioa/java/center/importPhysicalData?" +
+ "person_id="+this.BaseConfig.userInfo.person_id+
+ "&identity_id="+this.BaseConfig.userInfo.identity_id+
+ "&bureau_id="+this.BaseConfig.person_info_my.bureau_id;
+ axios.post(url,formDatas).then((res)=>{
+ this.loading = false;
+ let resData = res.data;
+ if(resData.code === 200){
+ Modal.success({
+ title: "导入成功",
+ content: "",
+ centered: true
+ });
+ this.getPhysicalList();
+ }else {
+ let errtips = resData.msg;
+ Modal.error({
+ title: "导入失败",
+ content: errtips,
+ centered: true
+ });
+ }
+ })
},
//取消导入
cancelImport:function () {
diff --git a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionInfo.vue b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionInfo.vue
index 913f779..6dfc810 100644
--- a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionInfo.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionInfo.vue
@@ -54,11 +54,6 @@
TimePicker
} from 'ant-design-vue';
import InterConfig from '../interConfig';
- import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
- import moment from 'moment';
- import ATextarea from "ant-design-vue/es/input/TextArea";
- import Upload from '../../../../../../components/common/uploader/Upload.vue';
- import SelectStudent from '../../../../../../components/common/selectPeople/SelectStudent';
export default{
props: {
monitorId: {
@@ -69,7 +64,6 @@
data(){
return {
pageLoading: false,
- locale,
stageName: "",
gradeName: "",
className: "",
diff --git a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionList.vue b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionList.vue
index 8733b14..300d61f 100644
--- a/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionList.vue
+++ b/src/views/screenAdaptation/pages/adminCenter/servicePlatform/moralEducation/visionList.vue
@@ -17,7 +17,9 @@
@click="search"/>
@@ -40,6 +42,7 @@
@cancel="handleCancel">
{{isClear?'是否确定删除全部信息?':'是否确定删除此条信息?'}}
+
@@ -49,6 +52,8 @@
import InterConfig from '../interConfig';
import {Table, Button, Select, Modal, Divider, Cascader, Icon, Input, Pagination} from 'ant-design-vue';
import VisionInfo from './visionInfo.vue';
+ import ImportExcel from '../../../../../../components/common/importExcel/importExcel.vue';
+ import axios from 'axios';
const tableColumn = [
{
dataIndex: 'index',
@@ -120,6 +125,7 @@
totalPage: 0,
totalNum: 0,
isClear:false,//false 仅仅删除数据 true 清除全部数据
+ showImport:false,//是否显示导入框
}
},
created(){
@@ -188,6 +194,50 @@
this.isClear = true;
this.visible = true;
},
+ //下载模板
+ toDownload:function () {
+ //window.location.href = window.location.protocol + "//" + window.location.host + "/dsideal_yy/pro_integration/reactProject/screenAdaptation/template/centerStudentPhysicalTemplate.xls";
+ //BaseConfig._action_path
+ window.location.href = window.location.protocol + "//" + "10.10.14.199"+ "/dsideal_yy/pro_integration/reactProject/screenAdaptation/template/centerStudentVisionTemplate.xls"
+ },
+ //弹出导入
+ toImport:function () {
+ this.showImport = true;
+ },
+ //开始导入
+ startImport:function (file) {
+ var formDatas = new FormData();
+ formDatas.append("file", file);
+ this.showImport = false;
+ this.loading = true;
+ let url = this.BaseConfig._action_path+"/dsideal_yy/ypt/intellioa/java/center/importVisionData?" +
+ "person_id="+this.BaseConfig.userInfo.person_id+
+ "&identity_id="+this.BaseConfig.userInfo.identity_id+
+ "&bureau_id="+this.BaseConfig.person_info_my.bureau_id;
+ axios.post(url,formDatas).then((res)=>{
+ this.loading = false;
+ let resData = res.data;
+ if(resData.code === 200){
+ Modal.success({
+ title: "导入成功",
+ content: "",
+ centered: true
+ });
+ this.getVisionList();
+ }else {
+ let errtips = resData.msg;
+ Modal.error({
+ title: "导入失败",
+ content: errtips,
+ centered: true
+ });
+ }
+ })
+ },
+ //取消导入
+ cancelImport:function () {
+ this.showImport = false;
+ },
//确定删除
handleOk: function () {
let param = {
@@ -238,7 +288,8 @@
AIcon: Icon,
AInput: Input,
APagination: Pagination,
- VisionInfo
+ VisionInfo,
+ ImportExcel
}
}