| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219 |
- <template>
- <div class="edit_baseInfo">
- <div class="plan_container" style="display:none;">
- <div class="title_container">
- <div class="title_container">
- <p style="font-weight:bolder;">选择计划</p>
- <el-select v-model="defaultPlan" :placeholder="duChaName" size="medium" style="margin-left:10px;">
- <el-option
- v-for="(item,index) in planList"
- :key="index"
- :label="item.schmTitle"
- :value="item.schmId"
- >
- </el-option>
- </el-select>
- </div>
- <div class="title_container">
- <el-button v-if="userType == '1'" @click="createNewPlan" class="new_plan" type="primary" size="medium" icon="el-icon-circle-plus" plain>新建督查计划</el-button>
- </div>
- </div>
- <p> <span class="hrall"></span></p>
- <div class="plan_content">
- <el-card class="box-card" style="background-color:#ECF8FF">
- <div style="display:flex;">
- <p class="file_info">
- <span>年度:{{currentDuChaInformation.niandu}}</span>
- <span>公文号:{{currentDuChaInformation.schmNum}}</span>
- <span>发文单位:{{currentDuChaInformation.schmCdpname}}</span>
- <span>发文时间:{{currentDuChaInformation.schmSttm}}</span>
- </p>
- <div style="width: 30%;text-align: center;">
- <span>相关附件:</span>
- <span @click="showPdfGzfa" style="cursor:pointer;color: blue;text-decoration: underline;">{{this.fileName}}</span>
- </div>
- </div>
- </el-card>
- </div>
- </div>
- <p><span style="width:120px;padding-left: 10px;">水利工程运行督查 > 督查分工</span><span class="hrs"></span></p>
- <div class="info_content" :style="{'height':contentHeight+'px'}" style="display:flex;flex-direction:row;justify-contnet:space-around;align-items:center;">
- <el-row style="height:100%;width:100%;" :gutter="20" id="contentRow">
- <el-col :span="9" style="height:100%;">
- <div class="grid-content bg-purple" style="height:100%;">
- <el-card class="box-card" style="height:100%;">
- <div slot="header" class="clearfix">
- <span>分工节点</span>
- </div>
- <!-- 左侧树 -->
- <div>
- <el-tree
- :highlight-current="true"
- style="height:100%;"
- :data="treeData"
- node-key="id"
- :expand-on-click-node="false"
- @node-click = 'treeNodeClickHandler'
- @node-expand = 'treeOpened'
- ref="jigou_tree"
- >
- <div class="custom-tree-node" slot-scope="{ node, data }">
- <span style="float:left:">{{ data.pnm}}
- <!-- <el-button v-if="data.type == '2'"
- type="text danger"
- icon="el-icon-circle-close"
- size="mini"
- style='color:red'
- @click="() => deletePICI(node, data)">
- </el-button> -->
- <el-button v-if="data.id.length > 6 && userInThisGroup(data) && hasPriv1('manage')"
- type="text danger"
- icon="el-icon-circle-close"
- size="mini"
- style='color:red'
- @click="() => deletePICI(node, data)">
- </el-button>
- <!-- <el-button v-if="data.type == '4'"
- type="text danger"
- icon="el-icon-circle-close"
- size="mini"
- style='color:red'
- @click="() => deleteZU(node, data)"> -->
- <!-- </el-button> -->
- </span>
- <div style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;">
- <!-- <span style="color:blue;margin-right:20%;" v-show="data.sttm!=''&&data.entm!=''">{{data.sttm}}/{{data.entm}}
- </span> -->
- <span style="color:blue;width:80px;">
- <!-- <el-button v-if="data.type == '1' && data.code != '100'"
- type="text"
- icon="el-icon-circle-plus"
- size="mini"
- @click="() => addPICI(node,data,'计划')">
- 新建计划
- </el-button> -->
- <el-button v-if="data.id.length < 10 && hasPriv1('manage')"
- type="text"
- icon="el-icon-circle-plus"
- size="mini"
- @click="() => addPICI(node,data,'批次')">
- 新建
- </el-button>
- <!-- <el-button v-if="data.type == '3'"
- type="text"
- icon="el-icon-circle-plus"
- size="mini"
- @click="() => addZU(node,data)">
- 添加督查组
- </el-button> -->
- </span>
- </div>
- </div>
- </el-tree>
- </div>
- </el-card>
- </div>
- </el-col>
- <el-col :span="15" style="height:100%;">
- <div class="grid-content bg-purple" style="height:100%;">
- <el-card class="box-card" style="height:100%;">
- <!-- <div slot="header" class="clearfix">
- <span>详情</span>
- </div> -->
- <!-- 右侧组件 -->
- <el-tabs v-model="activeContent" type="card" style="height:100%;width: 100%;">
- <el-tab-pane label="督查人员" name="first" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
- <duChaRenYuanList v-if="showRightComponent" ref="renYuanList" :objType="duChaType" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName" @showEditDialog="showEditDialog" ></duChaRenYuanList>
- </el-tab-pane>
- <el-tab-pane label="督查对象" name="second" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
- <duChaDuiXiangList v-if="showRightComponent" ref="duiXiangList" :objType="duChaType" :plnaId ="plnaTreeCode" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName"
- @showEditDialog_dx="showEditDialog_dx" @selectObjChange="selectObjChange" @emitCurrentObjSelectName="emitCurrentObjSelectName"></duChaDuiXiangList>
- </el-tab-pane>
- <!-- <el-tab-pane label="督查区域" name="third" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
- <duChaQuYuList v-if="showRightComponent && duChaType=='5'" ref="qyList" :objType="duChaType" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName"
- @showEditDialog="showEditDialog_qy" @selectObjChange="selectObjChange" @emitCurrentObjSelectName="emitCurrentObjSelectName"></duChaQuYuList>
- </el-tab-pane> -->
- </el-tabs>
- </el-card>
- </div>
- </el-col>
- </el-row>
- </div>
- <!-- <el-button type="primary" size="large" style="float:right;margin-right:10px;">下 发</el-button>
- <el-button type="primary" size="large" style="float:right;margin-right:10px;">保存</el-button> -->
- <!-- 新建督查计划话框 -->
- <el-dialog title="新建督查计划" :visible.sync="addPlanDialogVisible">
- <el-form :model="duchaForm" :label-width="formLabelWidth" class="ducha_form">
- <el-form-item label="公文号">
- <el-input v-model="duchaForm.wenhao" placeholder="请输入内容"></el-input>
- </el-form-item>
- <el-form-item label="时间范围">
- <el-date-picker
- v-model="duchaForm.startDate"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- value-format="yyyy-MM-dd"
- @blur="formInfo.date == '' ? showTipsTime = 1 : showTipsTime = 0">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="计划名称">
- <el-input v-model="duchaForm.name" placeholder="请输入内容"></el-input>
- </el-form-item>
- <el-form-item label="类型">
- <el-select v-model="duchaForm.type" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发文单位">
- <span style="font-size: 12px;color: #888"> 监督司</span>
- </el-form-item>
- <el-form-item label="接收单位">
- <!-- <el-tree :data="treeDataForNewPlan" :props="defaultProps" @node-click="handleNodeClick"></el-tree> -->
- <el-checkbox-group v-model="duchaForm.receiveUnit">
- <el-checkbox v-for="item in lyjgList" :key="item.orgCode" :label="item.orgName"></el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <el-form-item label="抄送单位">
- <el-checkbox-group v-model="duchaForm.copyUnit">
- <el-checkbox v-for="item in lyjgList" :key="item.orgCode" :label="item.orgName"></el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <el-form-item label="附件">
- <el-upload
- class="upload-demo"
- action="/pdcApi/file/insert"
- :data="formData"
- :on-remove="handleRemove"
- :file-list="fileList"
- :on-error="fileUpErr"
- :on-success="fileSuccess">
- <el-button size="small" type="primary">点击上传</el-button>
- <div slot="tip" class="el-upload__tip">只能上传doc/pdf文件,且不超过500kb</div>
- </el-upload>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addPlanDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="appendPlan" >确 定</el-button>
- </div>
- </el-dialog>
- <!-- 新建批次对话框 -->
- <el-dialog :title="'新建' + addTypeText" :visible.sync="addPICIDialogVisible">
- <el-form :model="piciForm" :label-width="formLabelWidth">
- <el-form-item :label="addTypeText + '名称'">
- <el-input v-model="piciForm.name" placeholder="请输入内容"></el-input>
- </el-form-item>
- <el-form-item label="时间范围" v-if="currentSelectTreeNodeId.length > 3">
- <el-date-picker
- v-model="piciForm.startDate"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- value-format="yyyy-MM-dd"
- @blur="formInfo.date == '' ? showTipsTime = 1 : showTipsTime = 0">
- </el-date-picker>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addPICIDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="appendPICI" >确 定</el-button>
- </div>
- </el-dialog>
- <editDczInfo ref="editDczInfoRef" :dczId="currentSelectTreeNodeId" :jiGouId="orgId" @addSuccess="RenYuanaAddSuccessHandler"></editDczInfo>
-
- <editDcdxInfoyunxing ref="editDcdxInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler"></editDcdxInfoyunxing>
- <!-- <editDcdxInfo ref="editDcdxInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler"></editDcdxInfo> -->
- <editDcqyInfo ref="editDcqyInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="quYuAddSuccessHandler"></editDcqyInfo>
- <!-- 新建督查组对话框 -->
- <el-dialog title="新建督查组" :visible.sync="addZuDialogVisible">
- <el-form :model="zuForm" class="duchazu_form">
- <el-form-item label="督查组名称" :label-width="formLabelWidth">
- <el-input v-model="zuForm.name" placeholder="请输入内容"></el-input>
- </el-form-item>
- <!-- <el-form-item label="组长" :label-width="formLabelWidth">
- <el-select v-model="zuForm.leaderCode" placeholder="请选择督查组组长" @change="zuLeaderChange">
- <el-option v-for="person in jigourenyuan" :label="person.personName" :key="person.personCode" :value="person.personCode"></el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item label="督查组员" :label-width="formLabelWidth">
- <el-input placeholder="请输入姓名" v-model="member_search" style="width: 200px;padding-bottom: 10px;" class="input-with-select">
- <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
- </el-input>
- </el-form-item>
- <el-form-item label="" :label-width="formLabelWidth">
- <!-- <el-transfer
- style="text-align: left; display: inline-block"
- v-model="zuForm.member"
- :props="{
- key: 'personCode',
- label: 'personName'
- }"
- :titles="['机构人员', '组员']"
- @change="zuMemberChange"
- :data="jigourenyuan">
- </el-transfer> -->
- <el-table border :data="currentShowList" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"
- ref="multipleTable" :row-class-name="tableRowClassName">
- <el-table-column type="selection" width="40"></el-table-column>
- <el-table-column prop="persName" width="100" label="姓名"></el-table-column>
- <el-table-column prop="sex" label="性别" width="50">
- <template slot-scope="scope">
- <span>{{scope.row.sex == '1' ? '女' : '男'}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="telnumb" label="电话"></el-table-column>
- <el-table-column prop="status" label="在职状态">
- <template slot-scope="scope">
- <span>{{scope.row.status == '1' ? '在岗' : '离岗'}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="bornPlac" label="户籍"></el-table-column>
- <el-table-column label="操作">
- <template slot-scope="scope">
- <!-- <el-radio v-model="radio" label="scope.persCode" @change="addGroupLeader(scope.row,$event)"></el-radio> -->
- <span :class="{'blue': isGroupLeader === scope.$index}" @click="addGroupLeader(scope,$event)" style="cursor:pointer">设置组长</span>
- </template>
- </el-table-column>
- </el-table>
- <div class="block" style="display:flex;flex-direction:row;justify-content:center;align-items:center;padding-top: 5px;background-color: #fff;">
- <el-pagination
- small
- @current-change="handleCurrentChange"
- :pager-count="5"
- :current-page.sync="pageIndex"
- :page-size="pageSize"
- layout="total, prev, pager, next"
- :total="total">
- </el-pagination>
- </div>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="addZuDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click='appendZU' >确 定</el-button>
- </div>
- </el-dialog>
- <!-- 管理人员框 -->
- <transition name="fade">
- <draggable v-if="showDetailpdfGzfa" initWidth=1000 initHeight=650 title="" style="z-index: 50000;top: 60px;left: 165px;background-color:white;" @closeDraggable="hiddenDetailGzfa">
- <div class="" style="height:100%;background-color:rgba(249,249,249,0.7);border-radius:0px 0px 10px 10px;padding-bottom: 10px;">
- <iframe id="gzfaPdf" width="100%" height="100%" :src="pdfTitle" color="white" background-color="white" currentScaleValue="page-width"></iframe>
- </div>
- </draggable>
- </transition>
- </div>
- </template>
- <script>
- import request from '../../utils/gw_ajax_request.js';
- import index from '../../router';
- import duChaDuiXiangList from '../duChaGuanLi/duChaDuiXiangList_xsk.vue';
- import duChaQuYuList from '../duChaGuanLi/duChaQuYuList.vue';
- import draggable from '../../widgets/draggable.vue'
- import {dateFormat} from '../../utils/gw_date.js'
- import {createNewDcPlan,findFileByBiz,getProvincialOrgList} from '../../api/duChaPlan.js'
- export default {
- props: [],
- components: {
- draggable,
- 'duChaDuiXiangList':duChaDuiXiangList,
- 'duChaQuYuList':duChaQuYuList,
- duChaRenYuanList:resolve => {require(['../duChaGuanLi/duChaRenYuanList.vue'],resolve)},
- editDczInfo:resolve => {require(['./editDczInfo.vue'],resolve)},
- editDcdxInfo:resolve => {require(['./editDcdxInfo.vue'],resolve)},
- editDcdxInfoyunxing:resolve => {require(['./editDcdxInfo_yunxing.vue'],resolve)},
- editDcqyInfo:resolve => {require(['./editDcqyInfo.vue'],resolve)},
- },
- data() {
- return {
- showRightComponent:false,
- contentHeight:window.innerHeight - 165,
- options: [
- {
- value: '1',
- label: '小水库督查计划'
- }, {
- value: '2',
- label: '农村饮用水工程督查计划'
- }, {
- value: '3',
- label: '水毁工程督查计划'
- }],
- lyjgList:[
- ],
- checkList:[],
- checkList1:[],
- pageIndex:1,
- pageSize:10,
- total:0,
- currentShowList:[],
- input5:'',
- formData:'',
- fileList:[],
- activeContent:'first',
- defaultPlan:'',
- dczInfo:{},
- dcdxInfo:{},
- // showEditDczInfo:false,
- duChaType:7,
- duChaCode:'',
- duChaName:'',
- planList: [],//督查列表
- fileUpData:[],//文件上传之后返回的文件信息
- tabContentHeight:0,
- deleteFlag:false,
- //业务用
- addPlanDialogVisible: false,
- addZuDialogVisible:false,
- addPICIDialogVisible:false,
- currentDuChaInformation:{
- "guid": "",
- "schmId": "",
- "schmNum": "",
- "schmTitle": "",
- "schmMkps": "",
- "schmType": "",
- "schmCdpcode": "",
- "schmSttm": "",
- "schmEnttm": "",
- "schmIntm": "",
- "schmUptm": '',
- "schmNote": "",
- "receiveDept": null,
- "copyDept": null,
- "fileList": null
- },
- //督查计划信息
- duchaForm:{
- wenhao: '',
- name:'',
- type:'',
- startDate:'',
- sendUnit: '监督司',
- receiveUnit: [],
- copyUnit: []
- },
- formLabelWidth:'120px',
- treeParams: {
- 'guid': '',
- 'userId': '',
- 'type': '',
- 'code': ''
- },
- treeData:[],
- organizationTree: [],
- addPICITreeNode:'',
- addZUTreeNode:'',
- //test
- addZuDialogVisible:false,
- zuForm: {
- name:'',
- leaderCode:'',
- leaderName:'',
- member:[],
- dist:'',
- target:[],
- },
- piciForm:{
- name:'',
- startDate:'',
- endDate:'',
- },
- jigourenyuan:[
- ],
- defaultProps: {
- children: 'children',
- label: 'label'
- },
- currentSelectTreeNodeName:'',
- currentSelectTreeNodeCode:'',
- currentSelectTreeNodeType:'',
- currentSelectTreeNodeId:'',
- plnaTreeCode:'',
- plnaTreeName:'',
- plnaTreeType:'',
- currentShowList:[
- // {
- // name: '张三',
- // tel: '110',
- // position: '处长',
- // jobTitle: '大师',
- // office: '黄河流域委员会'
- // },
- // {
- // name: '李四',
- // tel: '110',
- // position: '处长',
- // jobTitle: '大师',
- // office: '黄河流域委员会'
- // }
- ],
- isGroupLeader: '',
- groupLeaderId: '',
- memberId: '',
- memberIds: [],
- member_search: '',
- defaultDC: '',
- showDetailpdfGzfa:false,
- pdfTitle:'',
- fileName:'',
- fileObj:{},//存储文件相关对象
- firstMakeTree:true,
- staticJIGOUData:{
- '100':'水利部',
- '101':' 长江水利委员会',
- '102':'黄河水利委员会',
- '103':'淮河水利委员会',
- '104':'海河水利委员会',
- '105':'珠江水利委员会',
- '106':'松辽水利委员会',
- '107':'太湖流域管理局',
- '108':'中国水利水电科学研究院',
- '109':'中国灌溉排水发展中心',
- '110':'部督查办',
- },
- addType: '',
- addTypeText: '',
- }
- },
- computed:{
- userId:function(){
- return localStorage.getItem("userid")? localStorage.getItem("userid"): '1098101939614724096'
- },
- userInAllNode:function(){//当前登录用户所在的所有组信息
- return JSON.parse(localStorage.getItem("allNode"))? JSON.parse(localStorage.getItem("allNode")): []
- },
- orgId() {
- return localStorage.getItem("guid") ? localStorage.getItem("guid") : "";
- },
- orgName(){
- return localStorage.getItem("orgName")? localStorage.getItem("orgName"): ''
- },
- userType(){
- return localStorage.getItem("userType")? localStorage.getItem("userType"): '1'
- },
- currentShowLists:function(){
- return this.currentShowList.filter(item => item.persName.indexOf(this.member_search) > -1)
- },
- isAdmin:function(){
- return localStorage.getItem("isAdmin")? localStorage.getItem("isAdmin"): ''
- }
- },
- watch:{
- },
- mounted(){
- this.getPlanlist()
- this.getLeftTreeData();
- // this.getProvince()
- this.tabContentHeight = document.getElementById('contentRow').offsetHeight;
- this.showRightComponent = true;
- },
- methods:{
- hasPriv1(item){
- return this.ownPriv(item)
- },
- //判断当前用户 是否在该节点下 在 则没有删除权限
- userInThisGroup(item){
- var _self = this;
- if(_self.userInAllNode && _self.userInAllNode.length>0){
- for(var i=0;i<_self.userInAllNode.length;i++){
- if(_self.userInAllNode[i].id.substring(0,3)=='001'){
- if(item.id.length>_self.userInAllNode[i].id.length){
- return true;
- }else{
- return false;
- }
- }else{
- return true;
- }
- }
- }else{
- return true;
- }
- },
- tableRowClassName({row, rowIndex}) {
- if (rowIndex === this.isGroupLeader) {
- return 'zuzhang';
- }
- return '';
- },
- hiddenDetailGzfa:function(){
- this.showDetailpdfGzfa = false;
- },
- showPdfGzfa:function(){
- var pdfUrl = this.fileObj;
- if(pdfUrl.filePath.substring(pdfUrl.filePath.length-3) == 'doc' ||pdfUrl.filePath.substring(pdfUrl.filePath.length-4) == 'docx'){
- window.open('/pdcApi/'+pdfUrl.filePath);
- this.showDetailpdfGzfa = false;
- }else if(pdfUrl.filePath.substring(pdfUrl.filePath.length-3) == 'pdf'){
- this.showDetailpdfGzfa = true;
- this.pdfTitle = '/pdcApi/'+pdfUrl.filePath;
- };
- },
- createNewPlan(){
- this.addPlanDialogVisible = true;
- this.fileName = "";
- this.fileList = [];
- this.fileUpData = [];
- this.duchaForm = {
- wenhao: '',
- name:'',
- type:'',
- startDate:'',
- sendUnit: '监督司',
- receiveUnit: [],
- copyUnit: []
- };
- this.getTreeForNewPlan();
- },
- getTreeForNewPlan(){
- var _self = this;
- var obj = {};
- obj.guid = this.orgId;
- obj.type = '1';
- obj.code = this.orgId;
- // request.get('/dc/organization/base/getOrganizationTreeByGuidAndOthers',{params:obj}).then((res)=>{
- // _self.lyjgList = res.data;
- // })
- getProvincialOrgList().then(res=>{
- _self.lyjgList = res.data;
- })
- },
- zuMemberChange(){
- },
- zuLeaderChange(){
- },
- addGroupLeader(scope,event){
- this.isGroupLeader = scope.$index
- this.groupLeaderId = scope.row.guid
- this.memberIds.forEach((ele)=>{
- if(this.groupLeaderId == ele){
- console.log('选择组长')
- this.$refs.multipleTable.toggleRowSelection(scope.row,false)
- }
- })
- },
- handleSelectionChange(selection){
- // if(selection[selection.length - 1].guid == this.groupLeaderId){
- // selection.splice[selection.length - 1,1]
- // }
- this.memberIds = []
- console.log(selection)
- selection.forEach(element => {
- this.memberIds.push(element.guid)
- });
- this.memberId = this.memberIds.join(',')
- },
- //根据机构ID获取计划列表
- changePlan(data){
- this.planList.forEach((ele)=>{
- if(ele.schmId == data){
- this.defaultDC = ele
- }
- })
- },
- getPlanlist(){
- var _self = this;
- request.get('/dc/insp/scheme/getDCFAListByOrgId',{params:{'id': _self.orgId}}).then((res)=>{
- let objName = _self.staticJIGOUData[_self.orgId] ;
- let objCode = _self.orgId;
- let objtype = 2;
- _self.treeData.push({
- 'guid' : objCode,
- 'userId' : _self.orgId,
- 'type' : '1',
- 'code' : objCode,
- 'name' : objName
- });
- });
- },
- appendPlan(){
- var _self = this;
- var obj = {};
- var str_recieve = '';
- var str_copy = '';
- for(var i=0;i<this.lyjgList.length;i++){
- for(var j=0;j<this.duchaForm.receiveUnit.length;j++){
- if(this.lyjgList[i].orgName == this.duchaForm.receiveUnit[j]){
- str_recieve+=this.duchaForm.receiveUnit[j]+',';
- }
- }
- }
- for(var m=0;m<this.lyjgList.length;m++){
- for(var n=0;n<this.duchaForm.copyUnit.length;n++){
- if(this.lyjgList[m].orgName == this.duchaForm.copyUnit[n]){
- str_copy+=this.duchaForm.copyUnit[n]+',';
- }
- }
- }
- obj.schmNum = this.duchaForm.wenhao;//公文号
- obj.schmTitle = this.duchaForm.name;//计划名称
- obj.schmType = this.duchaForm.type;//类型
- obj.schmCdpcode = this.orgId;//发文单位代码
- obj.guid = this.orgId;//机构ID
- obj.schmSttm = this.duchaForm.startDate[0];
- obj.schmEnttm = this.duchaForm.startDate[1];
- obj.receiveDept = str_recieve;
- obj.copyDept = str_copy;
- obj.fileList = this.fileUpData;
- var params = {
- 'bisInspScheme':obj
- };
- request.post('/dc/insp/scheme',obj).then((res)=>{
- _self.getPlanlist()
- })
- // createNewDcPlan({'bisInspScheme':obj});
- this.addPlanDialogVisible = false
- },
- //根据用户id获取左侧树
- getLeftTreeData(){
- var _self = this;
- request.get('/dc/organization/base/getAllNode',{params:{'userId':this.userId,'orgType':'007'}}).then((res)=>{
- let data = res.data
- data.forEach(ele => {
- if(ele.pid == null || ele.pid == ''){
- ele.pid = '001'
- }if(ele.sttm==null || ele.sttm == ''){
- ele.sttm = ''
- }else{
- ele.sttm = dateFormat(ele.sttm,'yy-MM-dd');
- }if(ele.entm==null || ele.entm == ''){
- ele.entm = ''
- }else{
- ele.entm = dateFormat(ele.entm,'yy-MM-dd');
- }
- });
- data = _self.getTrees(data)
- _self.treeData = data;
- _self.currentSelectTreeNodeId = _self.treeData[0].id;
- // _self.duChaType = _self.treeData[0].id.substring(2,3);
- })
- },
- //格式化树形数据
- getTrees(list) {
- //@wxcwater重写方法 适应多个树
- let highLevelLength = 99;//预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
- let _self =this;
- list.forEach((item,index)=>{
- item['pidLength'] = item.pid&&item.pid!=''?item.pid.length:0;
- if(highLevelLength>item.pidLength){
- highLevelLength = item.pidLength;
- }
- });
- console.log(highLevelLength);
- let heightLevelNode = [];
- list.forEach((item,index)=>{
- if(highLevelLength>=item.pidLength){
- heightLevelNode.push(item);
- }
- });
- list.forEach((item,index)=>{
- heightLevelNode.forEach((pItem)=>{
- _self.addTreeNode(pItem,item);
- });
- });
- console.log(heightLevelNode);
- return heightLevelNode;
- },
- addTreeNode:function(treeNode,leafNode){
- let _self = this;
- if(!treeNode.hasOwnProperty('children')){
- treeNode['children'] = [];
- }
- if(leafNode.pid == treeNode.id){
- treeNode.children.push(leafNode);
- return;
- }
- treeNode.children.forEach((item) => {
- _self.addTreeNode(item,leafNode);
- });
- },
- loadNode(node, resolve) {
- if (node.level === 0) {
- return resolve(this.treeData);
- }
- Object.assign(this.dczInfo,node)
- if (node.level > 4) return resolve([]);
- if(node.level == 2){
- // this.duChaType = node.data.code
- }
- this.treeParams.type = node.data.type
- this.treeParams.code = node.data.code
- request.get('/dc/organization/base/getOrganizationTreeByParams',{params:this.treeParams}).then((res)=>{
- let data = res.data
- if(!node.data.hasOwnProperty('children')){
- node.data['children'] = [];
- }
- node.data['children'] = data;
- resolve(data)
- })
- },
- treeNodeClickHandler:function(data,node,tree){
- if(this.deleteFlag){//如果点击删除节点 则不更新节点id
- this.deleteFlag = false;
- return;
- }
- // this.duChaType = data.id.substring(2,3);
- this.currentSelectTreeNodeName = data.name;
- this.currentSelectTreeNodeCode = data.code;
- this.currentSelectTreeNodeType = data.type;
- this.currentSelectTreeNodeId = data.id;
- if(data.type=='3'){
- this.plnaTreeCode = data.code;
- this.plnaTreeName = data.name;
- this.plnaTreeType = data.type;
- }
- },
- treeOpened(data,node,tree){
- this.currentSelectTreeNodeName = data.name;
- this.currentSelectTreeNodeCode = data.code;
- this.currentSelectTreeNodeType = data.type;
- this.currentSelectTreeNodeId = data.id;
- if(data.type=='3'){
- this.plnaTreeCode = data.code;
- this.plnaTreeName = data.name;
- this.plnaTreeType = data.type;
- }
- },
- handleNodeClick(){},
- getOrganizationTree(){
- this.treeParams.userId = this.userId
- this.treeParams.guid = this.orgId
- request.get('/dc/organization/base/getOrganizationTreeByParams',{params:this.treeParams}).then((res)=>{
- this.organizationTree = res.data
- this.treeData = this.organizationTree
- })
- },
- appendPICI() {
- console.log(this.addPICITreeNode)
- var _self = this;
- // let params = {
- // 'guid': this.addPICITreeNode.code,
- // 'prsnTitle': this.piciForm.name,
- // 'prsnId': this.userId,
- // 'palnSttm': this.piciForm.startDate[0],
- // 'palnEntm': this.piciForm.startDate[1]
- // }
- let params = {
- 'prsnTitle': this.piciForm.name,
- 'guid': this.addPICITreeNode.id,
- 'palnSttm': this.piciForm.startDate[0],
- 'palnEntm': this.piciForm.startDate[1]
- }
- request.post('/dc/insp/plan/addBisInspPlan',params).then((res)=>{
- const newChild = { id:res.data.code , pid:_self.addPICITreeNode.id,pnm:_self.piciForm.name,sttm:'',entm:'', children: [] };
- //to-do wxcwater 改这里。
- _self.$refs['jigou_tree'].append(newChild,_self.addPICITreeNode.id);
- _self.addPICIDialogVisible = false;
- })
- },
- appendZU() {
- let params = {
- 'guid': this.orgId,
- 'headmanId': this.groupLeaderId,
- 'inspGroupName': this.zuForm.name,
- 'memberId': this.memberId,
- 'plnaId': this.addZUTreeNode.code,
- "downStat": 2,
- "note": "备注"
- }
- request.post('/dc/insp/group/insertGroup',params).then((res)=>{
- const newChild = { code:res.data.code , type:res.data.type,name:res.data.name };
- //to-do 改这里
- this.$refs['jigou_tree'].append(newChild,this.addZUTreeNode.code);
- this.addZuDialogVisible = false;
- this.isGroupLeader = ''
- this.zuForm.name = ''
- })
- },
- deletePICI:function(node,data){
- this.deleteFlag = true;
- this.$confirm('是否删除批次:'+data.pnm+'及关联督查组?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/dc/insp/plan/${node.data.id}`).then((res)=>{
- if(res.success){
- if(res.message=="请先删除人员或对象"){
- this.$message({
- type: 'warning',
- message: '请先删除组内人员、对象及区域!'
- });
- }else{
- this.$refs.jigou_tree.remove(node)
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- }
- }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- deleteZU:function(node,data){
- this.$confirm('是否删除督查组:'+data.name+'?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/dc/insp/group/delete?id=${node.data.code}`).then((res)=>{
- this.$refs.jigou_tree.remove(node)
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- afterRemove(node, data) {
- const parent = node.parent;
- const children = parent.data.children || parent.data;
- const index = children.findIndex(d => d.id === data.id);
- children.splice(index, 1);
- },
- addPICI:function(node,nodeData,addType){
- this.addPICITreeNode = node.data;
- this.addPICIDialogVisible = true;
- if(addType == '计划'){
- this.addType = 2
- // this.addTypeText = '计划'
- }else{
- this.addType = 3
- // this.addTypeText = '批次'
- }
- },
- addZU:function(node,nodeData){
- console.log(node.data)
- this.addZUTreeNode = node.data;
- this.addZuDialogVisible = true;
- let params = {
- 'orgGuid': this.orgId,
- 'pageSize' : this.pageSize,
- 'pageNum' : this.pageIndex
- }
- request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
- this.currentShowList = res.data.list
- this.total = res.data.total
- })
- },
- zuLeaderChange(){},
- zuMemberChange(){},
- showEditDialog(item){
- // this.dczInfo = item;
- // this.showEditDczInfo = true;
- this.$refs['editDczInfoRef'].showDialog();
- },
- showEditDialog_dx(item){
- this.$refs['editDcdxInfoRef'].showDialog(this.duChaType);
- },
- showEditDialog_qy(item){
- this.$refs['editDcqyInfoRef'].showDialog();
- },
- emitCurrentObjSelectName(item){
- this.$refs['editDcdxInfoRef'].changeCurrentObjSelectName(item);
- },
- selectObjChange(item){
- // this.duChaType = item;
- },
- handleRemove(){
- },
- fileChange(){
- },
- fileSuccess(item){
- this.fileUpData.push(item.data);
- console.log('上传成功',item);
- },
- fileUpErr(item){
- console.log(item+"wenjian");
- if(item.status == 413){
- this.$message({
- message: '文件大小超出500K!',
- type: 'warning'
- });
- }
- },
- search(){
- var _self = this;
- let params = {
- 'orgGuid': this.orgId,
- 'pageSize' : this.pageSize,
- 'pageNum' : this.pageIndex,
- 'persName':_self.member_search
- }
- request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
- this.currentShowList = res.data.list
- this.total = res.data.total
- })
- },
- handleCurrentChange(){
- let params = {
- 'orgGuid': this.orgId,
- 'pageSize' : this.pageSize,
- 'pageNum' : this.pageIndex
- }
- request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
- this.currentShowList = res.data.list
- this.total = res.data.total
- })
- },
- RenYuanaAddSuccessHandler:function(){
- this.$refs['renYuanList'].getDcryResult();
- },
- DuiXiangAddSuccessHandler:function(){
- this.$refs['duiXiangList'].getDcdxList1();
- },
- quYuAddSuccessHandler:function(){
- this.$refs['qyList'].getDcqyResult();
- },
- },
- }
- </script>
- <style>
- .el-table .zuzhang {
- background:#f0f9eb;
- }
- .edit_baseInfo{
- width: 100%;
- height:100%;
- padding: 20px;
- box-sizing: border-box;
- }
- .edit_baseInfo h3{
- line-height: 30px;
- font-size: 16px;
- color: #333;
- font-weight: normal;
- }
- .edit_baseInfo .info_content{
- padding: 10px 10px 10px 10px;
- font-size: 14px;
- overflow: hidden;
- }
- .edit_baseInfo .el-col {
- border-radius: 4px;
- /* margin-right: 20px; */
- }
- .edit_baseInfo .bg-purple-dark {
- background: #99a9bf;
- }
- .edit_baseInfo .bg-purple {
- background: #d3dce6;
- }
- .edit_baseInfo .el-card__header{
- padding: 8px 20px;
- }
- .edit_baseInfo .text {
- font-size: 14px;
- cursor: pointer;
- }
- .edit_baseInfo .text:hover{
- background-color: #eee;
- }
- .edit_baseInfo .item {
- padding: 5px;
- }
- .edit_baseInfo .clearfix:before,
- .edit_baseInfo .clearfix:after {
- display: table;
- content: "";
- }
- .edit_baseInfo .clearfix:after {
- clear: both
- }
- .plan_container .plan_content{
- /* height: 200px; */
- padding: 10px 20px;
- font-size: 14px;
- }
- .plan_container .plan_content .el-card.is-always-shadow{
- box-shadow: 0 2px 6px 0 rgba(0,0,0,.1)
- }
- .plan_container h2{
- margin-bottom: 10px;
- font-size: 22px;
- color: #333;
- }
- .plan_container h2 .el-icon-arrow-down{
- font-size: 20px;
- cursor: pointer;
- }
- .plan_container h2 span{
- margin-left: 20px;
- font-size: 14px;
- color: #666;
- font-weight: normal;
- }
- .plan_container .el-icon-time{
- position: relative;
- top: 2px;
- margin-right: 6px;
- font-size: 20px;
- }
- .plan_container ul{
- width: 220px;
- /* border: solid 1px #ccc; */
- list-style: none;
- border-radius: 3px;
- box-shadow: 0 2px 6px #ccc;
- position: absolute;
- z-index: 9;
- }
- .plan_container ul li{
- padding: 5px 10px;
- color: #888;
- }
- .plan_container ul li:hover{
- background-color: #eee;
- cursor: pointer;
- }
- .title_container{
- position: relative;
- display:flex;
- flex-direction:row;
- justify-content:space-between;
- align-items:center;
- }
- .title_container p{
- display: inline-block;
- font-size: 14px;
- margin-left: 20px;
- color: #666;
- }
- .hrall{
- display: inline-block;
- width: calc(100%);
- height: 1px;
- vertical-align: middle;
- background-color: #ddd;
- }
- p .hrs{
- display: inline-block;
- width: calc(100% - 40px);
- margin-left:10px;
- height: 1px;
- vertical-align: middle;
- background-color: #ddd;
- }
- .activeListItem{
- background-color:#409EFF !important;
- color:white !important;
- }
- .listitem{
- color:black;
- background-color:white;
- padding:3px;
- transition:all .5s;
- cursor:pointer;
- }
- .listitem:hover{
- border:1px solid #409EFF;
- cursor:pointer;
- }
- .info_content .el-card__body {
- padding: 16px;
- height: 88%;
- overflow-y: auto;
- /* display: flex; */
- }
- .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 15px;
- padding-right: 8px;
- }
- .new_plan{
- float: right;
- }
- .plan_content .el-card__body{
- padding: 10px;
- }
- .file_info{
- display: flex;
- justify-content: space-between;
- width: 80%;
- color: #666;
- }
- .ducha_form .el-input{
- width: 350px;
- }
- .duchazu_form .el-form-item__content{
- padding: 3px 2px;
- }
- .blue{
- color: blue;
- }
- body .el-table th.gutter{display: table-cell!important;}
- .edit_baseInfo .el-checkbox{
- margin-left:30px;
- }
- .duchazu_form .el-checkbox{
- margin-left: 0;
- }
- </style>
|