347617796@qq.com 3 rokov pred
rodič
commit
04548ccc5c
3 zmenil súbory, kde vykonal 11 pridanie a 10 odobranie
  1. 3 3
      src/main.js
  2. 6 5
      src/views/set/framework.vue
  3. 2 2
      src/views/set/rule.vue

+ 3 - 3
src/main.js

@@ -23,9 +23,9 @@ Vue.component("downloadExcel", JsonExcel);
 import userImage from '@/components/UserImage'
 Vue.component('userImage', userImage)
 Vue.use(ElementUI);
-// if (process.env.NODE_ENV === 'development') {
-//   new VConsole()
-// }
+if (process.env.NODE_ENV === 'development') {
+  new VConsole()
+}
 
 Vue.prototype.$echarts = echarts
 Vue.prototype.$dd=dd;

+ 6 - 5
src/views/set/framework.vue

@@ -271,13 +271,13 @@ export default {
 	methods: {
 		handleSuccess(response) {
 			if (response.code == 1) {
-				if (response.data.length > 0) {
-					var htmls = response.data;
+				if (response.data.list.length > 0) {
+					var htmls = response.data.list;
 					var str = "<div class='red'></div>";
 					htmls.forEach(item => {
-						str += `<div>${item.errors}</div>`;
+						str += `<div>${item.姓名}:${item.line_err}</div>`;
 					});
-					this.close_import();
+					console.log(str);
 					this.$notify.error({
 						title: '导入错误',
 						dangerouslyUseHTMLString: true,
@@ -286,8 +286,9 @@ export default {
 						offset: 50,
 						customClass: 'notifyBox'
 					});
+					this.close_import();
 				} else {
-					this.file = response.data;
+					this.file = response.data.list;
 					this.$message.success({ message: response.msg });
 					this.getEmployee();
 					this.close_import();

+ 2 - 2
src/views/set/rule.vue

@@ -720,7 +720,7 @@ export default {
 		del_rule() {
 			let self = this;
 			let data = {
-				item_id: [this.rules_detail_form.id]
+				item_ids:JSON.stringify([this.rules_detail_form.id])
 			};
 			this.delRule_loading = true;
 			self.$confirm('此操作将永久删除该选项, 是否继续?', '提示').then(
@@ -788,7 +788,7 @@ export default {
 				type: 'warning'
 			}).then(() => {
 				let data = {
-					item_id: this.del_item_id
+					item_ids: JSON.stringify(this.del_item_id)
 				};
 				this.$axios('post', '/api/integral/rule/items/destroy', data).then(res => {
 					if (res.data.code == 1) {