zouling 3 سال پیش
والد
کامیت
fb8e03a2ea
3فایلهای تغییر یافته به همراه78 افزوده شده و 30 حذف شده
  1. 1 0
      package.json
  2. 11 2
      src/api/system/time.js
  3. 66 28
      src/views/system/time/index.vue

+ 1 - 0
package.json

@@ -56,6 +56,7 @@
     "less": "^4.1.1",
     "less": "^4.1.1",
     "less-loader": "^4.1.0",
     "less-loader": "^4.1.0",
     "nprogress": "0.2.0",
     "nprogress": "0.2.0",
+    "qrcodejs2": "^0.0.2",
     "quill": "1.3.7",
     "quill": "1.3.7",
     "screenfull": "5.0.2",
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",
     "sortablejs": "1.10.2",

+ 11 - 2
src/api/system/time.js

@@ -82,8 +82,8 @@ export function idces(query) {
 // 导出参数
 // 导出参数
 export function exportConfig(query) {
 export function exportConfig(query) {
   return request({
   return request({
-    url: '/boman-file/common/file/async/export/ymjz',
-    method: 'get',
+    url: '/boman-file/common/file/async/export',
+    method: 'post',
     data: query
     data: query
   })
   })
 }
 }
@@ -113,3 +113,12 @@ export function yiaoe(query) {
 	data: query
 	data: query
   })
   })
 }
 }
+
+// 导出错误日志
+export function importLog(query){
+  return request({
+    url: '/boman-web-core/ymjzImportError/list',
+    method: 'get',
+    data: query
+  })
+}

+ 66 - 28
src/views/system/time/index.vue

@@ -192,18 +192,18 @@
       </el-col>
       </el-col>
 	  <el-col :span="1.5">
 	  <el-col :span="1.5">
 	    <el-button
 	    <el-button
-	      type="primary"
+	     type="danger"
 	      plain
 	      plain
 	      icon="el-icon-view"
 	      icon="el-icon-view"
 	      size="mini"
 	      size="mini"
 	      @click="handleImporthg"
 	      @click="handleImporthg"
-	    >导入进度</el-button>
+	    >导入错误日志</el-button>
 	  </el-col>
 	  </el-col>
 			<el-col :span="1.5">
 			<el-col :span="1.5">
 				<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['core:info:export']">导出</el-button>
 				<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['core:info:export']">导出</el-button>
 			</el-col>
 			</el-col>
 			<el-col :span="1.5">
 			<el-col :span="1.5">
-				<el-button type="primary" plain icon="el-icon-view" size="mini" @click="handleExportjy" v-hasPermi="['core:info:export']">导出进度</el-button>
+				<el-button type="primary" plain icon="el-icon-view" size="mini" @click="handleExportjy" :disabled="exportflag" v-hasPermi="['core:info:export']">导出进度</el-button>
 			</el-col>
 			</el-col>
 			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 		</el-row>
 		</el-row>
@@ -676,12 +676,28 @@
         <el-button type="primary" @click="submitFileForm">确 定</el-button>
         <el-button type="primary" @click="submitFileForm">确 定</el-button>
         <el-button @click="upload.opens = false">取 消</el-button>
         <el-button @click="upload.opens = false">取 消</el-button>
       </div>
       </div>
-    </el-dialog>
+    </el-dialog>
+    <!-- 导出日志错误 -->
+    <el-dialog :close-on-click-modal="false" title="导入错误日志" :visible.sync="errorlog" width="1200px" append-to-body class="ojhgy">
+    	<el-table :data="errorList" stripe style="width: 100%">
+    		<el-table-column label="姓名" align="center" prop="username" />
+    		<el-table-column label="所在乡镇" align="center" prop="town" />
+    		<el-table-column label="疫苗名称" align="center" prop="vaccineName" />
+    		<el-table-column label="剂次" align="center" prop="jici" />
+    		<el-table-column label="接种时间" align="center" prop="vaccinationTime" width="180">
+    			<template slot-scope="scope">
+    				<span>{{ scope.row.vaccinationTime }}</span>
+    			</template>
+    		</el-table-column>
+    		<el-table-column label="接种地点" align="center" prop="vaccinationPlace" />
+    	</el-table>
+    </el-dialog>
+
 	</div>
 	</div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr } from '@/api/system/time';
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog } from '@/api/system/time';
 import { treeselect } from '@/api/system/dept';
 import { treeselect } from '@/api/system/dept';
 import Treeselect from '@riophae/vue-treeselect';
 import Treeselect from '@riophae/vue-treeselect';
 import { getToken } from '@/utils/auth';
 import { getToken } from '@/utils/auth';
@@ -892,7 +908,10 @@ export default {
 			fireLise:{config:[]},
 			fireLise:{config:[]},
 			nameutaiL:0,
 			nameutaiL:0,
 			jue:false,
 			jue:false,
-			nhue:true
+			nhue:true,
+      exportflag:true,
+      errorlog:false,
+      errorList:[],
 		};
 		};
 	},
 	},
 	created() {
 	created() {
@@ -1068,7 +1087,8 @@ export default {
 		cancel() {
 		cancel() {
 			this.opens = false;
 			this.opens = false;
 			this.jiezhong = false;
 			this.jiezhong = false;
-			this.imashow = false;
+			this.imashow = false;
+      this.errorlog=false;
 			this.reset();
 			this.reset();
 		},
 		},
 		gywoa() {
 		gywoa() {
@@ -1584,7 +1604,7 @@ export default {
 				}else{
 				}else{
 					this.villageTownshy = '';
 					this.villageTownshy = '';
 				}
 				}
-				
+
 				if (this.form.vaccineInfoUserList !== null) {
 				if (this.form.vaccineInfoUserList !== null) {
 					if (this.form.vaccineInfoUserList.length == 0) {
 					if (this.form.vaccineInfoUserList.length == 0) {
 
 
@@ -1700,7 +1720,8 @@ export default {
                 tableName: "vaccine_info",
                 tableName: "vaccine_info",
                 empty: false,
                 empty: false,
                 condition: {}
                 condition: {}
-            }
+            }
+            var that=this;
             heuia.condition = this.queryParams
             heuia.condition = this.queryParams
 			const queryParams = this.queryParams
 			const queryParams = this.queryParams
 			this.$confirm('是否确认导出?', "警告", {
 			this.$confirm('是否确认导出?', "警告", {
@@ -1708,30 +1729,33 @@ export default {
 			    cancelButtonText: "取消",
 			    cancelButtonText: "取消",
 			    type: "warning"
 			    type: "warning"
 			  }).then(function() {
 			  }).then(function() {
-			    return exportConfig(queryParams);
+			    return exportConfig(heuia);
 			  }).then(response => {
 			  }).then(response => {
-				  const jues= response.data
-				exportConfigtyr().then(responsr => {
-							console.log(responsr)
-							if(responsr.data == true){
-								// this.download(jues);
-								// window.location.href = jues
-								window.open(jues)
-							}else{
-								this.msgSuccess('数据暂未加载完成,请稍后点击导出进度按钮查看');
-							}
-						});
-			    
+				  const jues= response.data
+          that.exportflag=false;
+          that.$alert('数据导入中,系统将自动处理数据,请稍后查看结果', "导出结果", { dangerouslyUseHTMLString: true });
+          // that.msgSuccess('数据导入中,系统将自动处理数据,请稍后查看结果');
+				// exportConfigtyr().then(responsr => {
+				// 			console.log(responsr)
+				// 			if(responsr.data == true){
+				// 				// this.download(jues);
+				// 				// window.location.href = jues
+				// 				window.open(jues)
+				// 			}else{
+				// 				this.msgSuccess('数据暂未加载完成,请稍后点击导出进度按钮查看');
+				// 			}
+				// 		});
+
 			  })
 			  })
-			  
-			  
+
+
 			// this.download('/boman-web-core/core/info/export',
 			// this.download('/boman-web-core/core/info/export',
 			// 	{
 			// 	{
 			// 		...this.queryParams
 			// 		...this.queryParams
 			// 	},
 			// 	},
 			// 	`post_${new Date().getTime()}.xlsx`
 			// 	`post_${new Date().getTime()}.xlsx`
 			// );
 			// );
-			
+
 		},
 		},
 		// 疫苗名称改变
 		// 疫苗名称改变
 		changeheu(index, data) {
 		changeheu(index, data) {
@@ -1905,12 +1929,26 @@ export default {
 	  }, `user_${new Date().getTime()}.xlsx`)
 	  }, `user_${new Date().getTime()}.xlsx`)
 	},
 	},
 	// 导入进度查询
 	// 导入进度查询
-	handleImporthg(){
-		
+	handleImporthg(){
+    importLog().then(res=>{
+      if(res.code==200){
+        this.errorList=res.rows;
+        this.errorlog=true;
+      }
+    })
 	},
 	},
 	// 导出进度查询
 	// 导出进度查询
 	handleExportjy(){
 	handleExportjy(){
-		
+		exportConfigtyr().then(responsr => {
+					// console.log(responsr)
+					if(responsr.data == true){
+						// this.download(jues);
+						// window.location.href = jues
+						window.open(responsr.msg)
+					}else{
+						this.msgSuccess('数据暂未加载完成,请稍后点击导出进度按钮查看');
+					}
+				});
 	}
 	}
 	}
 	}
 };
 };