From 8b02c58067617e7113c42b86ff3880e12c7c8e9f Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Fri, 22 Dec 2023 15:07:31 +0800 Subject: [PATCH] 'commit' --- WebRoot/view/tb/org/fields_set.html | 75 ++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 13 deletions(-) diff --git a/WebRoot/view/tb/org/fields_set.html b/WebRoot/view/tb/org/fields_set.html index a8f02206..47f4c808 100644 --- a/WebRoot/view/tb/org/fields_set.html +++ b/WebRoot/view/tb/org/fields_set.html @@ -16,16 +16,43 @@ .dh_ico { display: none; } + + .layui-layer-title { + padding: 0 80px 0 20px; + height: 50px; + line-height: 50px; + border-bottom: 1px solid #F0F0F0; + font-size: 14px; + color: #333; + overflow: hidden; + border-radius: 2px 2px 0 0; + } + + .layui-layer-setwin { + width: 50px; + height: 100%; + position: absolute; + right: 15px; + top: 17px; + font-size: 0; + line-height: initial; + } - 默认分割线 -
+
+
创建任务
+
+
+ +
-
-
+
+
+
Sheet表
@@ -35,8 +62,8 @@ @@ -47,7 +74,7 @@
-
+
@@ -55,7 +82,7 @@ style="width: 300px;">
- @@ -106,6 +133,7 @@ async: false, url: '/QingLong/collect/getSheets?job_id=' + jobId, success: function (res) { + var sheetListTpl = sheetListScript.innerHTML; var sheetListView = document.getElementById('sheetListView'); laytpl(sheetListTpl).render(res.data, function (html) { @@ -122,7 +150,7 @@ id: 'setField', elem: '#data-table', url: '/QingLong/collect/getSheetStruct?job_id=' + jobId + '&sheet_index=' + sheetIndex, - height: 'full-100', + height: 'full-150', page: false, even: true, css: [ @@ -135,7 +163,7 @@ { title: '原始名称', field: 'original_name', align: 'center', width: "20%" }, { title: '字段类型', align: 'center', width: "10%", templet: '#fieldsType_select' }, { title: '必填', align: 'center', width: "10%", templet: '#required_switch' }, - { title: '数据范围', field: 'options', align: 'center', edit: 'text' } + { title: '数据范围(用,号分隔)', field: 'options', align: 'center', edit: 'text' } ]], // skin: 'line', @@ -165,14 +193,13 @@ } else { data.allow_blank = 1; } - }); } }); } util.on({ - save: function () { + confirm: function () { var data = table.getData('setField'); // if (errArr.length > 0) { // layer.msg("有问题的数据,请检查!"); @@ -192,11 +219,33 @@ "job_id": jobId, "sheet_index": initSheetIndex }, + success: function (result) { + layer.msg('成功!', { + icon: 1, + time: 1500, + }); + unconfirmedCount--; + + $('#ico' + initSheetIndex).removeClass('dh_ico'); + } + }); + }, + save: function () { + $.ajax({ + type: "POST", + async: false, + dataType: "json", + url: "/QingLong/collect/saveJob", + data: { + "job_id": jobId, + "job_name": "测试任务" + }, success: function (result) { console.log(result); } }); } + }); //监听单元格编辑 @@ -204,7 +253,7 @@ var field = obj.field; var regex = /^[a-z][a-z0-9]{0,31}$/; - var cellElem = obj.tr.find('td[data-field="username"]'); + var cellElem = obj.tr.find('td[data-field="column_name"]'); if (regex.test(obj.value)) { var _index = errArr.indexOf(obj.index); errArr.splice(_index, 1);