|
|
|
@ -17,7 +17,9 @@
|
|
|
|
|
@click="search"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a-button type="primary" @click="toAdd" class="add-button-style">新增</a-button>
|
|
|
|
|
<a-button type="default" @click="toDownload" class="add-button-style">下载模板</a-button>
|
|
|
|
|
<a-button type="primary" @click="toImport" class="add-button-style" style="margin-right: 0.2rem">导入</a-button>
|
|
|
|
|
<a-button type="primary" @click="toAdd" class="add-button-style" style="margin-right: 0.2rem">新增</a-button>
|
|
|
|
|
<a-button type="danger" @click="toClear" class="add-button-style" style="margin-right: 0.5rem">清空</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -40,6 +42,7 @@
|
|
|
|
|
@cancel="handleCancel">
|
|
|
|
|
{{isClear?'是否确定删除全部信息?':'是否确定删除此条信息?'}}
|
|
|
|
|
</a-modal>
|
|
|
|
|
<import-excel :show="showImport" @cancel="cancelImport" @submitData="startImport"/>
|
|
|
|
|
<template v-if="pageType === 1">
|
|
|
|
|
<VisionInfo @cancel="cancel" :monitorId="monitorId"/>
|
|
|
|
|
</template>
|
|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|