zhgdyun/src/views/projectFront/scheduleManage/projectMasterPlan.vue

96 lines
3.0 KiB
Vue

<template>
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
<el-form-item label="承包商名称" prop="contractorName">
<el-input v-model="searchForm.contractorName"
:placeholder="$t('message.personnelPosition.please_enter')" clearable></el-input>
</el-form-item>
<!-- <el-form-item label="" prop="exampleProjectName">
<el-radio-group v-model="searchForm.exampleProjectName">
<el-radio :label="1">动态风险</el-radio>
<el-radio :label="2">静态风险</el-radio>
</el-radio-group>
</el-form-item> -->
<el-form-item>
<!-- v-permission="{key: 'renovate', menuPath: '/project/constructionManage/deviceManage'}" -->
<el-button type="primary" plain @click="loadCardData">
{{ $t("message.personnelPosition.beaconManage.query") }}
</el-button>
<el-button type="warning" plain @click="resetForm">
{{ $t("message.personnelPosition.beaconManage.refresh") }}
</el-button>
<el-button type="primary" @click="isAddPoint(1)"> 新增 </el-button>
</el-form-item>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<GanttChart />
</div>
</div>
</template>
<script>
import GanttChart from "./components/ganttChart.vue";
export default {
components: {
GanttChart,
},
data() {
return {
searchForm: {
contractorName: "",
exampleProjectName: "",
},
cardDialogTitle: "",
cardDialog: false,
cardForm: {},
isAdd: -1,
};
},
created() {
},
mounted() {
},
methods: {
resetForm() {
this.$refs["searchForm"].resetFields();
this.loadCardData();
},
//获取卡片列表
loadCardData() {
},
isAddPoint(type, item) {
this.isAdd = type;
this.initialFlag = true;
if (type == 1) {
this.initData();
this.$nextTick(() => {
this.$refs["cardForm"] && this.$refs["cardForm"].resetFields();
});
this.cardDialogTitle = this.$t("message.laborDev.add2");
} else if (type == 2) {
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //编辑卡片
console.log(item);
this.cardForm = {
...item,
attachment: item.attachment.map(ele => ele),
};
}
this.cardDialog = true;
},
},
};
</script>
<style lang="less" scoped>
.download {
color: #1684FC;
cursor: pointer;
}
</style>