diff --git a/package-lock.json b/package-lock.json index b2dfe85f..099464a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "better-scroll": "^2.4.1", "core-js": "^3.6.5", "css-declaration-sorter": "^6.3.1", - "dhtmlx-gantt": "^7.1.12", + "dhtmlx-gantt": "^7.1.13", "dom-to-image": "^2.6.0", "echarts": "^5.1.0", "echarts4": "npm:echarts@^4.8.0", @@ -21,6 +21,8 @@ "flv.js": "^1.6.2", "gantt-elastic": "^1.0.12", "html2canvas": "^1.0.0-rc.7", + "jquery": "^3.6.3", + "jquery-ui-dist": "^1.13.2", "js-base64": "^3.7.2", "js-md5": "^0.7.3", "lrz": "^4.9.41", @@ -6812,9 +6814,9 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" }, "node_modules/dhtmlx-gantt": { - "version": "7.1.12", - "resolved": "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.12.tgz", - "integrity": "sha512-8xC/DbBR/jqy6bnTT+qc6uKZPdQwYqpw6U8LJRb2A9Uz0BdYvKCptVfXIQOERFOLEqjymSzbCu4z/OwmabuCrg==" + "version": "7.1.13", + "resolved": "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.13.tgz", + "integrity": "sha512-PnVk6HI8LcOu1E6o9sJ5UpeWRiaXLnNa5t3i0oFPXPVkDrDyZdNr0KduryF45R7DWMSyMkxJ9RGJ+iUiqQCDhg==" }, "node_modules/diffie-hellman": { "version": "5.0.3", @@ -9680,6 +9682,19 @@ "node": ">=8" } }, + "node_modules/jquery": { + "version": "3.6.3", + "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.6.3.tgz", + "integrity": "sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==" + }, + "node_modules/jquery-ui-dist": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/jquery-ui-dist/-/jquery-ui-dist-1.13.2.tgz", + "integrity": "sha512-oVDRd1NLtTbBwpRKAYdIRgpWVDzeBhfy7Gu0RmY6JEaZtmBq6kDn1pm5SgDiAotrnDS+RoTRXO6xvcNTxA9tOA==", + "dependencies": { + "jquery": ">=1.8.0 <4.0.0" + } + }, "node_modules/js-base64": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", @@ -26787,9 +26802,9 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" }, "dhtmlx-gantt": { - "version": "7.1.12", - "resolved": "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.12.tgz", - "integrity": "sha512-8xC/DbBR/jqy6bnTT+qc6uKZPdQwYqpw6U8LJRb2A9Uz0BdYvKCptVfXIQOERFOLEqjymSzbCu4z/OwmabuCrg==" + "version": "7.1.13", + "resolved": "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.13.tgz", + "integrity": "sha512-PnVk6HI8LcOu1E6o9sJ5UpeWRiaXLnNa5t3i0oFPXPVkDrDyZdNr0KduryF45R7DWMSyMkxJ9RGJ+iUiqQCDhg==" }, "diffie-hellman": { "version": "5.0.3", @@ -29114,6 +29129,19 @@ } } }, + "jquery": { + "version": "3.6.3", + "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.6.3.tgz", + "integrity": "sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==" + }, + "jquery-ui-dist": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/jquery-ui-dist/-/jquery-ui-dist-1.13.2.tgz", + "integrity": "sha512-oVDRd1NLtTbBwpRKAYdIRgpWVDzeBhfy7Gu0RmY6JEaZtmBq6kDn1pm5SgDiAotrnDS+RoTRXO6xvcNTxA9tOA==", + "requires": { + "jquery": ">=1.8.0 <4.0.0" + } + }, "js-base64": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", diff --git a/package.json b/package.json index a960060c..5e0b8589 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "better-scroll": "^2.4.1", "core-js": "^3.6.5", "css-declaration-sorter": "^6.3.1", - "dhtmlx-gantt": "^7.1.12", + "dhtmlx-gantt": "^7.1.13", "dom-to-image": "^2.6.0", "echarts": "^5.1.0", "echarts4": "npm:echarts@^4.8.0", @@ -21,6 +21,8 @@ "flv.js": "^1.6.2", "gantt-elastic": "^1.0.12", "html2canvas": "^1.0.0-rc.7", + "jquery": "^3.6.3", + "jquery-ui-dist": "^1.13.2", "js-base64": "^3.7.2", "js-md5": "^0.7.3", "lrz": "^4.9.41", diff --git a/src/assets/js/http.js b/src/assets/js/http.js index e0b60c8b..23c64fc1 100644 --- a/src/assets/js/http.js +++ b/src/assets/js/http.js @@ -78,7 +78,8 @@ if (process.env.NODE_ENV == 'development') { // axios.defaults.baseURL = 'http://218.92.215.138:9090/' //盐城 新佳城小区 123456 // axios.defaults.baseURL = 'http://36.137.53.203:9090/' //盐城 gdjt 123456789 // axios.defaults.baseURL = 'http://183.234.150.152:9090/' //华发 huaxin 123456789 - // axios.defaults.baseURL = 'http://139.9.66.234:7072/' //三江集团 + // axios.defaults.baseURL = 'http://139.9.66.234:7072/' //三江集团测试环境 + // axios.defaults.baseURL = 'http://116.169.63.183:7070' //三江集团正式环境 } else if (process.env.NODE_ENV == 'debug') { axios.defaults.baseURL = 'https://www.ceshi.com' diff --git a/src/store/index.js b/src/store/index.js index 4f4b1f8d..0980a4b4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -63,8 +63,8 @@ export default new Vuex.Store({ // BASEURL:'http://192.168.34.116:6023/', // UPLOADURL: 'http://192.168.34.116:6023/upload/image', // FILEURL: 'http://192.168.34.116:6023/image/', - // UPLOADURL: 'http://124.71.67.160:8088/upload/image', - // FILEURL: 'http://124.71.67.160:8088/image/', + UPLOADURL: 'http://124.71.67.160:8088/upload/image', + FILEURL: 'http://124.71.67.160:8088/image/', //--- // UPLOADURL: 'http://192.168.34.125:6023/upload/image', // FILEURL: 'http://192.168.34.125:6023/image/', @@ -72,8 +72,10 @@ export default new Vuex.Store({ // UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式 // FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式 // FILEURL:'http://'+"47.97.202.104:6023"+'/image/',//正式 - UPLOADURL: 'http://182.90.224.147:100/upload/image',//演示平台 - FILEURL: 'http://182.90.224.147:100/image/',//演示平台 + // UPLOADURL: 'http://182.90.224.147:100/upload/image',//演示平台 + // FILEURL: 'http://182.90.224.147:100/image/',//演示平台 + // UPLOADURL: 'http://139.9.66.234:7072/upload/image',//三江集团 + // FILEURL: 'http://139.9.66.234:7072/image/',//三江集团 ACCOUNTTYPE: [ "系统管理员", diff --git a/src/views/projectFront/laborManage/personDetails.vue b/src/views/projectFront/laborManage/personDetails.vue index cc5fb1c3..919d8496 100644 --- a/src/views/projectFront/laborManage/personDetails.vue +++ b/src/views/projectFront/laborManage/personDetails.vue @@ -2571,7 +2571,8 @@ export default { if (type == 1) { if ( file.type != "image/jpeg" && - file.type != "image/jpg" + file.type != "image/jpg"&& + file.type != "image/png" // file.type != "image/png" ) { this.$message.error(this.$t("message.laborMange.hint8")); @@ -2584,7 +2585,7 @@ export default { // type==1 现场采集照 2 身份证反面 3 身份证正面 4 合同 5 资格证书 6 身份证头像 if (type == 1) { let imgStatus = file2.size / 1024 < 500; - if (!imgStatus) { + if (imgStatus) { this.cropperOption.img = this.$store.state.FILEURL + file.data[0].imageUrl; this.cropperDialog = true; @@ -2629,7 +2630,6 @@ export default { }, // 人员照片库比对 checkImgLibrary(url) { - console.log(url); checkImgLibraryApi({ fileUrl: url, projectSn: this.projectSn }).then( (res) => { if (res.result && res.result.length > 0) { @@ -2649,8 +2649,12 @@ export default { }, //人脸监测、 checkFace(url) { + console.log('url',url); + checkFaceApi({ fileUrl: url }).then((res) => { - if (res.result.checkType == 1) { + console.log('res数据',res); + + if (res.result.checkType ==1) { this.workerInfo.fieldAcquisitionUrl = url; this.cropperDialog = false; } else { @@ -2682,7 +2686,8 @@ export default { // this.checkFace(res.data.data[0].imageUrl) if (this.isSzProject == 1) { this.checkImgLibrary(res.data.data[0].imageUrl); - } else { + } + else { this.checkFace(res.data.data[0].imageUrl); } } diff --git a/src/views/projectFront/projectSummary/extendInfo.vue b/src/views/projectFront/projectSummary/extendInfo.vue index 21519c1e..e2ab1738 100644 --- a/src/views/projectFront/projectSummary/extendInfo.vue +++ b/src/views/projectFront/projectSummary/extendInfo.vue @@ -189,13 +189,13 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - :picker-options="pickerOptions" clearable value-format="yyyy-MM-dd" format="yyyy-MM-dd" @input="getContractTime" > + "+ + ""+'-'+ + ""+ + "";; + }, + set_value(node, value, task, section) { + startDatepicker(node).datepicker({ + dateFormat: "yy-mm-dd", + onSelect: () => { + } + }); + + startDatepicker(node).datepicker("setDate", task.planned_start); + + endDateInput(node).datepicker({ + dateFormat: "yy-mm-dd", + onSelect: function (dateStr) { + // gantt.ext.inlineEditors.save() + } + }); + endDateInput(node).datepicker("setDate", task.planned_end); + }, + get_value(node, task, section) { + + if(task.planned_start && task.planned_end) { + var start = startDatepicker(node).datepicker('getDate'); + var end = endDateInput(node).datepicker('getDate'); + + task.planned_start = start; + task.planned_end = end; + } + + // task.duration = gantt.calculateDuration(task); + }, + focus(node) { + + } + } //弹出层 + gantt.config.lightbox.sections = [ //工程名称 { @@ -263,8 +311,13 @@ export default { type: "time", time_format: ["%Y", "%m", "%d"], }, - // //实际开始/结束时间 - // { name: "actualTime", height: 72, map_to: "auto", type: "date" }, + //实际开始/结束时间 + { + name: "deadline", + height: 30, + type: "datepicker", + map_to:"auto", + }, // 完成状态 { @@ -330,9 +383,9 @@ export default { //弹窗标题 日期范围 gantt.templates.task_time = function (start, end, task) { return ( - moment(task.startDate).format("YYYY-MM-DD") + + moment(task.start_date).format("YYYY-MM-DD") + " - " + - moment(task.finishDate).format("YYYY-MM-DD") + moment(task.end_date).format("YYYY-MM-DD") ); }; //弹窗标题 计划名称 @@ -340,7 +393,6 @@ export default { return task.text; }; gantt.init(this.$refs.gantt); - gantt.parse(this.$props.tasks); let this_ = this; //添加后触发 gantt.attachEvent("onAfterTaskAdd", function (id, item) { @@ -372,8 +424,8 @@ export default { taskName: item.text, taskTypeId: Number(item.taskTypeId) - 1, finishDate: moment(item.end_date).format("YYYY-MM-DD"),//计划结束 - actualStartDate: moment(item.actual_start_date).format("YYYY-MM-DD"),//实际开始 - actualFinishDate: moment(item.actual_end_date).format("YYYY-MM-DD"),//实际结束 + actualStartDate: moment(item.planned_start).format("YYYY-MM-DD"),//实际开始 + actualFinishDate: moment(item.planned_end).format("YYYY-MM-DD"),//实际结束 }; addProgressTaskApi(data).then((res) => { console.log("添加的数据", res); @@ -400,7 +452,7 @@ export default { }); }); //修改任务后触发 - gantt.attachEvent("onAfterTaskUpdate", function (id, item) { + const onAfterTaskDrag =gantt.attachEvent("onAfterTaskUpdate", function (id, item) { console.log("修改任务后触发", item); let data = { duration: Number(item.ck), @@ -414,14 +466,15 @@ export default { taskName: item.text, taskTypeId: Number(item.taskTypeId) - 1, finishDate: moment(item.end_date).format("YYYY-MM-DD"),//计划结束 - actualStartDate: moment(item.actual_start_date).format("YYYY-MM-DD"),//实际开始 - actualFinishDate: moment(item.actual_end_date).format("YYYY-MM-DD"),//实际结束 + actualStartDate: moment(item.planned_start).format("YYYY-MM-DD"),//实际开始 + actualFinishDate: moment(item.planned_end).format("YYYY-MM-DD"),//实际结束 }; editProgressTaskApi(data).then((res) => { console.log("修改的数据", res); this_.getParentChildList(); }); }); + this_.events.push(onAfterTaskDrag) //拖拽任务后触发 gantt.attachEvent("onTaskDrag", function (id, mode, task, original) { @@ -446,19 +499,21 @@ export default { this.projectSn = this.$store.state.projectSn; this.getParentChildList(); }, + beforeDestroy () { + this.events.forEach(ele => { + gantt.detachEvent(ele) + }) + }, methods: { //数据格式整理 - changeTask() { + changeTask(ganttValue) { // return - console.log("开始数据整理"); - const taskCount = gantt.getTaskCount(); + const taskCount = ganttValue.length; let taskData = []; let openTask = []; for (let i = 0; i < taskCount; i++) { let taskOne = {}; - const obj = gantt.getTaskByIndex(i); - console.log("整理数据的 ", obj); - console.log("整理数据的 大小", typeof obj.id); + const obj = ganttValue[i]; if (obj == null || typeof obj.id === "number") { continue; } @@ -470,12 +525,9 @@ export default { //整理数据格式 taskOne.id = obj.id; taskOne.text = obj.taskName || obj.text; - // if (obj.start_date != null) { - // taskOne.start_date = moment(obj.start_date).format("YYYY-MM-DD"); - // } - // if (obj.end_date != null) { - // taskOne.end_date = moment(obj.end_date).format("YYYY-MM-DD"); - // } + + + if (obj.startDate != null) { taskOne.start_date = moment(obj.startDate).format("YYYY-MM-DD"); @@ -484,14 +536,12 @@ export default { taskOne.end_date = moment(obj.finishDate).format("YYYY-MM-DD"); } if (obj.actualStartDate != null) { - taskOne.actual_start_date = moment(obj.actualStartDate).format( + taskOne.planned_start = moment(obj.actualStartDate).format( "YYYY-MM-DD" ); } if (obj.actualFinishDate != null) { - taskOne.actual_end_date = moment(obj.actualFinishDate).format( - "YYYY-MM-DD" - ); + taskOne.planned_end = moment(obj.actualFinishDate).format("YYYY-MM-DD"); } taskOne.duration = obj.duration; @@ -509,6 +559,9 @@ export default { if (obj.parentId) { taskOne.parent = obj.parentId; } + if(i == 0) { + console.log("第一条数据结构 :", JSON.stringify(taskOne)); + } taskData.push(taskOne); } this.$props.tasks.data = taskData; @@ -527,15 +580,11 @@ export default { getParentChildListApi({ projectSn: this.projectSn }).then((res) => { this.check(res.result); this.dataList = res.result; - console.log("甘特图列表数据", this.tasks.data); - console.log(" this.$props.tasks", this.$props.tasks); this.$props.tasks.data = this.tasks.data; - console.log(" this.$props.tasks 赋值后", this.$props.tasks); - - gantt.parse(this.$props.tasks); - this.changeTask(); + // gantt.parse(this.$props.tasks); + this.changeTask(this.tasks.data); }); }, check(val) { @@ -543,7 +592,6 @@ export default { val.forEach((res) => { this.tasks.data.push(res); if (res.predecessorIds != "" && res.predecessorIds != null) { - console.log("res.predecessorIds---", res.predecessorIds); let dataLinks = res.predecessorIds.split(","); let dataLink = { source: dataLinks[dataLinks.length - 1], @@ -594,17 +642,6 @@ export default { diff --git a/yarn.lock b/yarn.lock index 35e0b719..3294189e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4143,10 +4143,10 @@ "integrity" "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" "version" "2.0.4" -"dhtmlx-gantt@^7.1.12": - "integrity" "sha512-8xC/DbBR/jqy6bnTT+qc6uKZPdQwYqpw6U8LJRb2A9Uz0BdYvKCptVfXIQOERFOLEqjymSzbCu4z/OwmabuCrg==" - "resolved" "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.12.tgz" - "version" "7.1.12" +"dhtmlx-gantt@^7.1.13": + "integrity" "sha512-PnVk6HI8LcOu1E6o9sJ5UpeWRiaXLnNa5t3i0oFPXPVkDrDyZdNr0KduryF45R7DWMSyMkxJ9RGJ+iUiqQCDhg==" + "resolved" "https://registry.npmmirror.com/dhtmlx-gantt/-/dhtmlx-gantt-7.1.13.tgz" + "version" "7.1.13" "diffie-hellman@^5.0.0": "integrity" "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==" @@ -6267,6 +6267,18 @@ "merge-stream" "^2.0.0" "supports-color" "^7.0.0" +"jquery-ui-dist@^1.13.2": + "integrity" "sha512-oVDRd1NLtTbBwpRKAYdIRgpWVDzeBhfy7Gu0RmY6JEaZtmBq6kDn1pm5SgDiAotrnDS+RoTRXO6xvcNTxA9tOA==" + "resolved" "https://registry.npmmirror.com/jquery-ui-dist/-/jquery-ui-dist-1.13.2.tgz" + "version" "1.13.2" + dependencies: + "jquery" ">=1.8.0 <4.0.0" + +"jquery@^3.6.3", "jquery@>=1.8.0 <4.0.0": + "integrity" "sha512-bZ5Sy3YzKo9Fyc8wH2iIQK4JImJ6R0GWI9kL1/k7Z91ZBNgkRXE6U0JfHIizZbort8ZunhSI3jw9I6253ahKfg==" + "resolved" "https://registry.npmmirror.com/jquery/-/jquery-3.6.3.tgz" + "version" "3.6.3" + "js-base64@^2.1.9": "integrity" "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" "resolved" "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz"