Browse Source

Merge branch 'master' of http://116.63.33.55/git/industry-data-platform

lry 9 months ago
parent
commit
5de2fe9cd9

+ 1 - 0
.gitignore

@@ -5,3 +5,4 @@
 /PrintServer/selenium/Chrome/Application
 /industry-system/HCNetSDKLog
 /PrintServer/logs
+/industry-system/industry-da/src/main/resources/static

+ 1 - 1
industry-admin/src/views/report/runConfig/printConfigList.vue

@@ -34,6 +34,7 @@
 import { getAllPrintConfig, delPrintConfigById } from '@/api/report/print'
 import CommonTable from '@/components/CommonTable/index.vue'
 import PrintConfig from './printConfig.vue'
+import {showConfirmWin} from "@/utils/cqcy"
 export default {
     components: {
         CommonTable,
@@ -161,7 +162,6 @@ export default {
         },
         /** 编辑打印配置事件 */
         updatePrintConfigEvent(row) {
-            console.log(row)
             this.$refs.printConfig.printConfigForm.id = row.id
             this.$refs.printConfig.title = '修改打印配置'
             this.$refs.printConfig.isDisable = false

+ 19 - 5
industry-system/industry-da/src/main/resources/static/reportSheet/js/src/model/item-list-table.js

@@ -257,14 +257,28 @@ layui.define(['layer', 'form', 'table', 'util', 'dataSettingw', 'sheetUtil', 'it
 	})
 	table.on('edit(item-list-table)',function(obj){
 		var value = obj.value,
+		oldValue = obj.oldValue,
 		data = obj.data,
 		field = obj.field;
-		fn.data.itemList.sort((a,b)=>a.orderindex-b.orderindex);
-		table.reloadData('item-list-table', {
-			data:fn.data.itemList
-		})
+		if(field === "orderindex"){
+			//判断数据类型
+			if (!isNaN(Number(value)) && /^[1-9]{1}\d*$/.test(value)) {
+				// 非NaN即数字 && 自然数
+			}else{
+				layer.msg('请输入数字', {icon: 2})
+				fn.data.itemList.forEach(v => {
+					if(v.itemId === data.itemId){
+						v.orderindex = oldValue;
+					}
+				})
+			}
+			fn.data.itemList.sort((a,b)=>a.orderindex-b.orderindex);
+			table.reloadData('item-list-table', {
+				data:fn.data.itemList
+			})
+		}
 	})
-	
+
 	form.on('radio(dataValType)', function(data) {
 		if (data.elem.value == 1) {
 			$('.data-valLine').addClass('layui-hide')