| | |
| | | ><span class="color" style="background-color: rgb(14, 172, 81)"></span>
|
| | | </div>
|
| | | </div>
|
| | | <div ref="gantt" style="height: 400px; font-size: 12px"></div>
|
| | | <div ref="gantt" style="height: 100%; font-size: 12px"></div>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | |
| | | export default {
|
| | | name: "Gantt",
|
| | | components: {},
|
| | | props: {
|
| | | selectedId: {
|
| | | type: String,
|
| | | default: "",
|
| | | },
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | taskslist: [],
|
| | |
| | | },
|
| | | columnsShow: false,
|
| | | };
|
| | | },
|
| | | watch: {
|
| | | selectedId: {
|
| | | handler(newVal) {
|
| | | console.log("甘特图接收到的数据:", newVal);
|
| | | // 处理数据变化的逻辑
|
| | | },
|
| | | deep: true, // 深度监听对象内部变化
|
| | | immediate: true, // 立即执行一次
|
| | | },
|
| | | },
|
| | | mounted() {
|
| | | this.init(); //初始化
|
| | |
| | | </script>
|
| | | <style lang="scss" scoped>
|
| | | .gantt-box {
|
| | | height: calc(100% - 52px);
|
| | | background-color: rgba(0, 0, 0, 0.2);
|
| | | margin: 10px;
|
| | | color: #fff;
|