|
@@ -1,8 +1,9 @@
|
|
-b{{ src/components/Gantt.vue }}
|
|
|
|
|
|
+{{ src/components/Gantt.vue }}
|
|
<template>
|
|
<template>
|
|
- <div ref="gantt"></div>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div ref="gantt" style="height:600px;"></div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
import {gantt} from 'dhtmlx-gantt';
|
|
import {gantt} from 'dhtmlx-gantt';
|
|
import { notification } from 'ant-design-vue';
|
|
import { notification } from 'ant-design-vue';
|
|
@@ -368,9 +369,9 @@ export default {
|
|
// { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
|
|
// { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
|
|
{ name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
|
|
{ name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
|
|
{ name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
|
|
{ name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
|
|
- { name: "start_date", label: "开始时间", width: 100, resize: true, align: "center" },
|
|
|
|
- { name: "end_date", label: "结束时间", width: 100, resize: true, align: "center" },
|
|
|
|
- { name: "statusC", label: "状态", width: 100, resize: true, align: "center" },
|
|
|
|
|
|
+ { name: "start_date", label: "开始时间", width: 90, resize: true, align: "center" },
|
|
|
|
+ { name: "end_date", label: "结束时间", width: 90, resize: true, align: "center" },
|
|
|
|
+ { name: "statusC", label: "状态", width: 60, resize: true, align: "center" },
|
|
// { name: "status", label: "状态", width: 130, resize: true, align: "center",
|
|
// { name: "status", label: "状态", width: 130, resize: true, align: "center",
|
|
// // options: [
|
|
// // options: [
|
|
// // { key: "0", label: gantt.locale.labels.status_0 },
|
|
// // { key: "0", label: gantt.locale.labels.status_0 },
|
|
@@ -424,16 +425,19 @@ export default {
|
|
time_format: ["%Y", "%m", "%d"],
|
|
time_format: ["%Y", "%m", "%d"],
|
|
|
|
|
|
},
|
|
},
|
|
- { name: "head", height: 30, map_to: "pm", type: "select", options:gantt.serverList("manager") },
|
|
|
|
{
|
|
{
|
|
- name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]),
|
|
|
|
|
|
+ name: "reportNo", height: 30, map_to: "reportNo", type: "text", type: "textarea",focus: true,
|
|
},
|
|
},
|
|
|
|
+ { name: "head", height: 30, map_to: "pm", type: "select", options:gantt.serverList("manager") },
|
|
{
|
|
{
|
|
- name: "sensor", height: 30, map_to: "chuanganqi", type: "select", options: gantt.serverList('chuanganqi',[]),
|
|
|
|
|
|
+ name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- name: "reportNo", height: 30, map_to: "reportNo", type: "text", type: "textarea",focus: true,
|
|
|
|
|
|
+ name: "sensor", height: 30, map_to: "chuanganqi", type: "checkbox", options: gantt.serverList('chuanganqi',[]),
|
|
},
|
|
},
|
|
|
|
+ // {
|
|
|
|
+ // name: "sensor", height: 30, map_to: "chuanganqi", type: "multiselect", options: gantt.serverList('chuanganqi'), unassigned_value:5 ,
|
|
|
|
+ // },
|
|
// { name: "description", height: 70, map_to: "description", type: "textarea" },
|
|
// { name: "description", height: 70, map_to: "description", type: "textarea" },
|
|
// {
|
|
// {
|
|
// name: "priority", height: 40, map_to: "priority", type: "radio", options: gantt.serverList("priority")
|
|
// name: "priority", height: 40, map_to: "priority", type: "radio", options: gantt.serverList("priority")
|
|
@@ -455,6 +459,45 @@ export default {
|
|
|
|
|
|
<style>
|
|
<style>
|
|
@import "~dhtmlx-gantt/codebase/dhtmlxgantt.css";
|
|
@import "~dhtmlx-gantt/codebase/dhtmlxgantt.css";
|
|
|
|
+ html, body {
|
|
|
|
+ padding: 0px;
|
|
|
|
+ margin: 0px;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #gantt_here {
|
|
|
|
+ width:100%;
|
|
|
|
+ height:100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .gantt_grid_scale .gantt_grid_head_cell,
|
|
|
|
+ .gantt_task .gantt_task_scale .gantt_scale_cell {
|
|
|
|
+ /* font-weight: bold; */
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: rgba(0, 0, 0, 0.7);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .owner-label{
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ border: 1px solid #cccccc;
|
|
|
|
+ border-radius: 25px;
|
|
|
|
+ background: #e6e6e6;
|
|
|
|
+ color: #6f6f6f;
|
|
|
|
+ margin: 0 3px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .gantt_cal_larea{
|
|
|
|
+ overflow:visible;
|
|
|
|
+ }
|
|
|
|
+ .gantt_cal_chosen,
|
|
|
|
+ .gantt_cal_chosen select{
|
|
|
|
+ width: 400px;
|
|
|
|
+ }
|
|
.status{
|
|
.status{
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
margin-top: 5px;
|
|
margin-top: 5px;
|