| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883 |
- <template>
- <div style="height:100%;width:100%;">
- <el-container style="height:100%;width:100%;">
- <el-aside :height="asideHeight" style="padding-right: 10px;width: 300px;">
- <div :style="{'height': asideHeight + 'px','overflow': 'auto'}" class="left_tree">
- <el-card class="box-card" style="min-height: 99%;" id="headerBtn">
- <div slot="header" class="clearfix">
- <div style="width: 100%;text-align: center;">
- <el-button size="mini" :class="tabType==1 ? 'c_active' : 'c_normal'" @click="tabChange('1')">当前数据</el-button>
- <!-- <el-button size="mini" :class="tabType==2 ? 'c_active' : 'c_normal'" @click="tabChange('2')">历史数据</el-button>-->
- <el-button size="mini" :class="tabType==0 ? 'c_active' : 'c_normal'" @click="tabChange('0')">全部数据</el-button>
- </div>
- <span style="line-height: 30px;">督查组</span>
- </div>
- <el-tree :data="groupTreeData" :props="defaultProps" :expand-on-click-node="false" @node-click="groupHandleNodeClick">
- </el-tree>
- </el-card>
- </div>
- </el-aside>
- <el-aside style="width: calc(50% - 300px);" :height="asideHeight">
- <div :style="{'height': asideHeight + 'px','overflow': 'auto'}" class="left_tree">
- <el-card class="box-card" style="min-height: 99%">
- <div slot="header" class="clearfix">
- <span>工程信息</span>
- </div>
- <el-tree :data="treeData" :props="defaultProps" :expand-on-click-node="false" @node-click="handleNodeClick">
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span>{{ node.label }}</span>
- <span>
- <!-- <el-button-->
- <!-- type="text"-->
- <!-- size="mini"-->
- <!-- v-if="node.level == 1"-->
- <!-- @click="() => updateState(data,node)">-->
- <!-- 提交-->
- <!-- </el-button>-->
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 1"
- @click="() => downloadDuty(data,node)">
- 下载追究责任意见表
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 1"
- @click="() => toCorrect(data,node)">
- 纠错
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 1"
- @click="() => toAddUnitOne(data,node)">
- 添加标段
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 2"
- @click="() => toEditUnitOne(data,node)">
- 编辑
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 2"
- @click="() => toAddUnitTwo(data,node)">
- 添加责任单位
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 3"
- @click="() => toSign(data,node)">
- 签字
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 3"
- @click="() => toZzyzg(data,node)">
- 追责与整改
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 3"
- @click="() => toEditUnitTwo(data,node)">
- 编辑
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 3"
- @click="() => delete_unitTwo(data,node)">
- 删除
- </el-button>
- <el-button
- type="text"
- size="mini"
- v-if="node.level == 3"
- @click="() => downDataTable(data,node)">
- 检查表下载
- </el-button>
- </span>
- </span>
- </el-tree>
- </el-card>
- </div>
- </el-aside>
- <el-main id="dxdcListMainsk" style="width: calc(100% - 700px);height:100%;padding:0px 0px 0px 10px;">
- <div class="flex_wrapper" :style="{'height': asideHeight-9 + 'px'}">
- <!-- 工程问题清单 -->
- <project-problem :currentRow="currentRow" :showAddBtn="showAddBtn" :tabType="tabType" :levelId="levelId"></project-problem>
- </div>
- </el-main>
- </el-container>
- <!-- 工程纠错 -->
- <el-dialog :title="'基本信息纠错'" :visible.sync="correct_Dialog" v-if="correct_Dialog" @close="closeDialogP">
- <jichuxinxi
- :currentResCode="currentResCode"
- :currentObjectId="currentObjectId"
- @close="closeDialogP"
- :currentObjectRgstrId="currentObjectRgstrId"
- :currentObjectName="currentObjectName"
- :openType="openType">
- </jichuxinxi>
- </el-dialog>
- <el-dialog :title="'签字'" :visible.sync="sign_Dialog" v-if="sign_Dialog" @close="closeDialogSign">
- <signature
- :currentObjectRgstrId="currentObjectRgstrId"
- :labelList="signatureLabelList"
- :openType="openType">
- </signature>
- </el-dialog>
- <el-dialog :title="'追责与整改'" :visible.sync="zzyzg_Dialog" v-if="zzyzg_Dialog" @close="closeDialogZg">
- <zzyzg
- :currentObjectRgstrId="currentObjectRgstrId"
- :zgName="zgName"
- :zgNature="zgNature"
- @close="closeDialogZg"
- :openType="openType">
- </zzyzg>
- </el-dialog>
- <!-- 添加/编辑一级管理单位 -->
- <el-dialog :title="dialogType + '标段'" :visible.sync="unitOne_Dialog">
- <el-form label-width="120px">
- <el-form-item label="标段名称" required>
- <el-input v-model="unitOne.nm" clearable></el-input>
- </el-form-item>
- <el-form-item label="经度">
- <el-input v-model="unitOne.centerX" clearable></el-input>
- </el-form-item>
- <el-form-item label="纬度">
- <el-input v-model="unitOne.centerY" clearable></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="unitOne_Dialog = false">取 消</el-button>
- <el-button type="primary" @click="addUnitOne">确 定</el-button>
- </div>
- </el-dialog>
- <!-- 添加/编辑责任单位单位 -->
- <el-dialog :title="dialogType + '责任单位'" :visible.sync="unitTwo_Dialog">
- <el-form label-width="120px">
- <el-form-item label="责任单位" required>
- <el-input v-model="unitTwo.nm" clearable></el-input>
- </el-form-item>
- <el-form-item label="单位性质" required>
- <el-select v-model="unitTwo.nature" clearable placeholder="单位性质">
- <el-option label="项目法人(建设单位)" value="1"></el-option>
- <el-option label="施工单位" value="2"></el-option>
- <el-option label="监理单位" value="3"></el-option>
- <el-option label="勘测设计单位" value="4"></el-option>
- </el-select>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="unitTwo_Dialog = false">取 消</el-button>
- <el-button type="primary" @click="add_unitTwo">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import request from "../../utils/gw_ajax_request.js";
- import { dateFormat } from "../../utils/gw_date.js";
- import { getTrees } from "@util/gw_formatTree.js";
- import jichuxinxi from './slxmaqscxj/jichuxinxi';
- import zzyzg from './slxmaqscxj/zzyzg';
- import signature from './slxmaqscxj/signature';
- import provTreeList from "../../widgets/provTreeList.vue";
- import projectProblem from "./project/slxmaqxjProblem.vue";
- import {exportModel} from "@util/gw_exportModel";
- export default {
- components: {
- jichuxinxi:jichuxinxi,
- zzyzg:zzyzg,
- signature:signature,
- provTreeList: provTreeList,
- projectProblem: projectProblem,
- },
- props: [],
- data() {
- return {
- asideHeight: window.innerHeight - 106,
- tableHeight: window.innerHeight - 256,
- treeData: [],
- defaultProps: {
- children: 'children',
- label: 'pnm'
- },
- currentResCode:"",
- currentObjectId:"",
- currentObjectRgstrId:"",
- zgName:"",
- zgNature:"",
- currentObjectName:"",
- openType:true,
- signatureLabelList:['督查人员','被检查单位负责人'],
- searchObj:{},
- project: {
- nm: "",
- ptype: "",
- stwktm: "",
- buidTimeYear: "",
- estapp: ""
- },
- unitOne: {
- nm: "",
- centerX:"",
- centerY:""
- },
- currentRow: {},
- pageIndex: 1,
- pageSize: 20,
- total: 0,
- dialogType: "添加",
- unitOne_Dialog: false,
- correct_Dialog: false,
- sign_Dialog: false,
- zzyzg_Dialog:false,
- showProblemDialog: false,
- typeOfProject: '78',
- title: '水利项目安全生产巡检填报',
- isClicked: true,
- showGongChengTianBaoPl: false,
- //
- unitTwoList: [],
- unitThreeList: [],
- unitTwo: {
- nm: "",
- nature:""
- },
- unitThree: {
- nm: "",
- pid: ""
- },
- unitTwo_Dialog: false,
- unitThree_Dialog: false,
- showProblemDialog: false,
- unitProblemInfo: {
- codes: ''
- },
- unitLevel: '一级管理单位', //一级管理单位 二级管理单位 三级管理单位
- currentUnitTwoRow: {},
- isClicked: true,
- currentUnitOneRow: {},
- currentUnitThreeRow: {},
- jqmmShow: false,
- imageShow: false,
- jqmmEngId: '',
- slgcyxName: '',
- centerX: 0,
- centerY: 0,
- //
- groupTreeData: [],
- plnaId: '078', //督查组id
- showAddBtn: false,
- levelId:"",
- tabType:"0"
- };
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.getGroupData();
- },
- activated() {
- this.getDataList();
- },
- watch: {
- },
- methods: {
- async downloadDuty(row){
- let url = "/pdcApi/bis/insp/wtprj/responsibility/investigation/"+row.id;
- let type = "get";
- let exportName = row.pnm+"-追究责任意见表.pdf"
- let result = await exportModel(type, url, exportName, row);
- },
- async downDataTable(row) {
- let url = "/pdcApi//bis/insp/wtprj/unit/checkList/export/"+row.id;
- let type = "get";
- let exportName = row.pnm+"-水利项目安全生产巡检.pdf"
- let result = await exportModel(type, url, exportName, row);
- },
- closeDialogZg(){
- this.zzyzg_Dialog = false;
- },
- closeDialogSign(){
- this.sign_Dialog = false;
- },
- closeDialogP(){
- this.correct_Dialog = false;
- },
- tabChange(tabType){
- this.tabType = tabType;
- this.getGroupData();
- },
- //获取工程列表信息
- getDataList() {
- let paramObj = {
- //type: "empwtrun",
- presId: this.persId,
- pageSize: this.pageSize,
- pageNum: this.pageIndex,
- plnaId: this.plnaId,
- tabType:this.tabType
- }
- Object.assign(this.searchObj,paramObj)
- request.post(`/bis/insp/wtprj/tree`, this.searchObj).then(res => {
- if (res.success) {
- this.treeData = res.data;
- if (this.treeData.length) {
- this.currentRow = this.treeData[0];
- // this.addRegister()
- }
- }
- });
- },
- toSign(row) {
- this.currentObjectRgstrId = row.id;
- this.sign_Dialog = true;
- },
- toZzyzg(row){
- var _self = this;
- request.get(`/bis/insp/wtprj/unit/${row.id}`).then((res) => {
- if(res.success){
- _self.currentObjectRgstrId = row.id;
- _self.zgName = row.pnm;
- _self.zgNature = res.data.nature;
- _self.zzyzg_Dialog = true;
- }else{
- this.$message.error(res.message)
- }
- });
- },
- updateState(row){
- var _self = this;
- this.$confirm('请确认提交该信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let formObj = {
- "id":row.id,
- "state":"2"
- }
- request.post('/bis/insp/wtprj', formObj).then((res) => {
- if (res.success) {
- _self.$message.success("提交成功");
- } else {
- _self.cancelHandler();
- }
- });
- }).catch(() => {
- });
- },
- // 工程信息纠错
- toCorrect(row) {
- this.currentRow = row;
- this.currentResCode = this.currentRow.code;
- this.currentObjectId = this.currentRow.objId;
- this.currentObjectRgstrId = this.currentRow.id;
- this.currentObjectName = this.currentRow.pnm;
- this.openType = true;
- this.correct_Dialog = true;
- },
- saveCorrect() {
- this.project.persId = this.persId;
- request.post(`/bis/insp/empwtprj/base/update`, this.project).then(res => {
- if (res.success) {
- this.$message.success("修改成功");
- this.correct_Dialog = false;
- this.getDataList();
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- },
- // 添加标段
- toAddUnitOne(row,node) {
- this.dialogType = "添加";
- this.currentRow = row
- this.unitOne = {
- nm: "",
- centerX:"",
- centerY:""
- };
- this.unitOne.rgstrId = row.id;
- this.unitOne.objId = row.objId;
- this.unitOne.adCode = row.adCode;
- this.unitOne_Dialog = true;
- },
- toEditUnitOne(row){
- this.dialogType = '编辑'
- this.currentUnitOneRow = row
- request.get(`/bis/insp/wtprj/section/${row.id}`).then((res) => {
- if(res.success){
- this.unitOne = res.data;
- this.unitOne_Dialog = true
- }else{
- this.$message.error(res.message)
- }
- });
- },
- addUnitOne() {
- if(!this.unitOne.nm){
- this.$message.warning('请填写标段名称')
- return
- }
- if(this.isClicked){
- this.isClicked = false
- if(this.dialogType == '添加'){
- this.unitOne.persId = this.persId;
- request.post(`/bis/insp/wtprj/section`, this.unitOne).then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //向树节点追加已添加的新单位
- const newChild = { id: res.data.id, objId: res.data.objId, pnm: res.data.nm, level:2,children: [] };
- if (!this.currentRow.children) {
- this.$set(this.currentRow, 'children', []);
- }
- this.currentRow.children.push(newChild);
- this.unitOne_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- }else{
- request.post(`/bis/insp/wtprj/section`, this.unitOne).then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //编辑成功后改变树节点显示的标段名称
- this.currentUnitOneRow.pnm = res.data.nm
- this.unitOne_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- }
- }
- },
- formatDate(row, column) {
- if (row.uptm) {
- return dateFormat(row.uptm, "yyyy-MM-dd");
- }
- },
- batchImport(){
- this.showGongChengTianBaoPl = true
- },
- closePlDialog(){
- this.showGongChengTianBaoPl = false
- },
- //树节点点击事件
- handleNodeClick(data,node) {
- this.currentRow = data;
- this.levelId = node.level;
- if(node.level == 3){
- this.showAddBtn=true;
- this.currentRow.objId = node.parent.parent.data.objId;
- this.currentRow.secId = node.parent.data.id;
- this.currentRow.regId = data.id;
- request.get(`/bis/insp/wtprj/unit/${data.id}`).then((res) => {
- if(res.success){
- this.currentRow.nature = res.data.nature;
- }else{
- this.$message.error(res.message)
- }
- });
- }else{
- this.showAddBtn=false;
- if(node.level == 1){
- this.currentRow.objId = data.objId;
- this.currentRow.secId = "";
- this.currentRow.regId = ""
- }
- if(node.level == 2){
- this.currentRow.objId = node.parent.objId;
- this.currentRow.secId = data.id;
- this.currentRow.regId = "";
- }
- }
- },
- // 添加责任单位
- toAddUnitTwo(row) {
- this.dialogType = "添加";
- this.currentUnitOneRow = row
- this.unitTwo = {
- nm: "",
- nature:""
- };
- this.unitTwo.secId = row.id;
- this.unitTwo_Dialog = true;
- },
- toEditUnitTwo(row) {
- this.dialogType = "编辑";
- this.currentUnitTwoRow = row
- request.get(`/bis/insp/wtprj/unit/${row.id}`).then((res) => {
- if(res.success){
- this.unitTwo = res.data;
- this.unitTwo_Dialog = true
- }else{
- this.$message.error(res.message)
- }
- });
- },
- add_unitTwo() {
- if(!this.unitTwo.nm){
- this.$message.warning('请填写责任单位')
- return
- }
- if(!this.unitTwo.nature){
- this.$message.warning('请选择单位性质')
- return
- }
- if(this.isClicked){
- this.isClicked = false
- if (this.dialogType == "添加") {
- this.unitTwo.persId = this.persId;
- request
- .post(`/bis/insp/wtprj/unit`, this.unitTwo)
- .then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //向树节点追加已添加的新标段
- const newChild = { id: res.data.id, objId: res.data.objId, pnm: res.data.nm,level:3,children: [] };
- if (!this.currentUnitOneRow.children) {
- this.$set(this.currentUnitOneRow, 'children', []);
- }
- this.currentUnitOneRow.children.push(newChild);
- this.unitTwo_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- } else {
- request
- .post(`/bis/insp/wtprj/unit`, this.unitTwo)
- .then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //编辑成功后改变树节点显示的标段名称
- this.currentUnitTwoRow.pnm = res.data.nm
- this.unitTwo_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- }
- }
- },
- delete_unitTwo(row,node) {
- this.$confirm("确认删除当前责任单位吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- request.post(`/bis/insp/wtprj/unit/delete/${row.id}`).then(res => {
- if (res.success) {
- this.$message.success("删除成功");
- const parent = node.parent;
- const children = parent.data.children || parent.data;
- const index = children.findIndex(d => d.id === row.id);
- children.splice(index, 1);
- } else {
- this.$message.error(res.message);
- }
- });
- })
- .catch(() => {});
- },
- // 添加三级管理单位
- toAddUnitThree(row,node) {
- this.dialogType = "添加";
- this.currentRow = node.parent.parent.parent.data
- this.currentUnitTwoRow = row
- this.unitThree = {
- nm: "",
- pid: this.currentUnitTwoRow.id
- };
- this.unitThree_Dialog = true;
- },
- toEditUnitThree(row) {
- this.dialogType = "编辑";
- this.currentUnitThreeRow = row
- request.get(`/bis/insp/mampu/info/${row.id}`).then((res) => {
- if(res.success){
- this.unitThree = res.data;
- this.unitThree_Dialog = true
- }else{
- this.$message.error(res.message)
- }
- });
- },
- add_unitThree() {
- if(!this.unitThree.nm){
- this.$message.warning('请填写三级单位名称')
- return
- }
- if(this.isClicked){
- this.isClicked = false
- if (this.dialogType == "添加") {
- this.unitThree.lev = "3";
- this.unitThree.regId = this.currentRow.id;
- this.unitThree.pid = this.currentUnitTwoRow.id;
- this.unitThree.persId = this.persId;
- request
- .post(`/bis/insp/mampu/info/add`, this.unitThree)
- .then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //向树节点追加已添加的新单位
- const newChild = { id: res.data.id, objId: res.data.objId, pnm: res.data.nm, children: [] };
- if (!this.currentUnitTwoRow.children) {
- this.$set(this.currentUnitTwoRow, 'children', []);
- }
- this.currentUnitTwoRow.children.push(newChild);
- this.unitThree_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- } else {
- request
- .post(`/bis/insp/mampu/info/update`, this.unitThree)
- .then(res => {
- if (res.success) {
- this.$message.success(this.dialogType + "成功");
- //编辑成功后改变树节点显示的标段名称
- this.currentUnitThreeRow.pnm = res.data.nm
- this.unitThree_Dialog = false;
- setTimeout(()=> {
- this.isClicked = true
- }, 1000);
- } else {
- this.$message.error(res.message);
- }
- })
- .catch(error => {
- this.$message.error(res.message);
- });
- }
- }
- },
- delete_unitThree(row,node) {
- this.$confirm("确认删除当前单位吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- request.post(`/bis/insp/mampu/info/delete/${row.id}`).then(res => {
- if (res.success) {
- this.$message.success("删除成功");
- const parent = node.parent;
- const children = parent.data.children || parent.data;
- const index = children.findIndex(d => d.id === row.id);
- children.splice(index, 1);
- } else {
- this.$message.error(res.message);
- }
- });
- })
- .catch(() => {});
- },
- // 近期面貌
- recentAppearance(){
- this.jqmmShow = true;
- // this.jqmmShow += 1;
- },
- jqmmDialog(){
- this.jqmmShow = false;
- },
- // 影像
- imageClick(){
- if(!this.centerX && !this.centerY){
- this.$message.warning('暂无经纬度信息!');
- return false;
- }
- this.imageShow = true;
- },
- // 点击督查组
- getGroupData(){
- let params = {
- userId: this.persId,
- orgType: '078',
- tabType:this.tabType
- }
- request.get(`/dc/organization/base/getAllNode`,{params:params}).then(res=>{
- if(res.success){
- let data = res.data;
- data = getTrees(data);
- this.groupTreeData = data.length>0?data[0].children:[];
- if(data[0] && data[0].id){
- this.plnaId = this.groupTreeData[0].id
- }
- this.getDataList();
- }else{
- this.$message.warning(res.message)
- }
- })
- },
- groupHandleNodeClick(data,node){
- this.plnaId = data.id
- this.getDataList()
- }
- },
- watch:{
- },
- filters: {
- pType(val) {
- if (val != "0" && !val) {
- return "";
- }
- if (val == "0") {
- return "重大农业节水工程";
- } else if (val == "1") {
- return "重大引调水工程";
- } else if (val == "2") {
- return "重点水源工程";
- } else if (val == "3") {
- return "江河湖泊治理骨干工程";
- } else if (val == "4") {
- return "新建大型灌区工程";
- } else if (val == "5") {
- return "非水利部下达投资计划";
- } else if (val == "6") {
- return "全部由地方投资";
- } else if (val == "7") {
- return "其他项目";
- } else {
- return "未知项目";
- }
- },
- nature(val) {
- if (val != "0" && !val) {
- return "";
- }
- if (val == "1") {
- return "项目法人(建设单位)";
- } else if (val == "2") {
- return "勘察设计单位";
- } else if (val == "3") {
- return "监理单位";
- } else if (val == "4") {
- return "施工单位";
- } else if (val == "5") {
- return "金属结构及机电设备安装单位";
- } else if (val == "6") {
- return "安全监测单位";
- } else if (val == "7") {
- return "质量检测单位";
- } else {
- return "其它";
- }
- },
- government(val) {
- if (val != "0" && !val) {
- return "";
- }
- if (val == "1") {
- return "直管";
- } else if (val == "2") {
- return "代建";
- }
- }
- }
- };
- </script>
- <style lang="scss">
- #dcdxHeader {
- padding: 15px 20px;
- }
- #dxdcFooter {
- text-align: center;
- }
- #dxdcAside {
- border: 1px solid #d5d5ff;
- }
- .el-table .warning-row {
- background: oldlace;
- }
- .el-table .success-row {
- background: #f0f9eb;
- }
- .left_tree .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- }
- .c_active{
- background: #3f8eff !important;
- color:white !important;
- padding: 7px 10px !important;
- }
- .c_normal{
- background: white !important;
- padding: 7px 10px !important;
- }
- #headerBtn div.el-card__header{
- padding: 5px 3px !important;
- }
- </style>
|