| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334 |
- <template>
- <div class="edit_baseInfo">
- <div class="plan_container" style="display:none;">
- <div class="title_container">
- <!-- <h2>{{planList[0].schmTitle}} <i class="el-icon-arrow-down" @click="showTitlelist = !showTitlelist"></i> <span><i class="el-icon-time"></i>{{planList[0].schmSttm}} - {{planList[0].schmEnttm}}</span> </h2>
- <ul v-show="showTitlelist">
- <li v-for="(item,index) in planList" :key="index">{{item.schmTitle}}</li>
- <li>222</li>
- </ul> -->
- <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">
- <h3 style="font-weight:bolder;color:#409EFF"><i class="el-icon-info" style="margin-right:10px;"></i>督查内容</h3>
- <p>{{currentDuChaInformation.note}}</p>
- </el-card> -->
- <el-card class="box-card" style="background-color:#ECF8FF">
- <!-- <div style="margin-bottom: 20px">
- <span>选择公文:</span>
- <el-select v-model="defaultPlan" size="medium" :placeholder="currentDuChaInformation.title" 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 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"
- >
- <span class="custom-tree-node" slot-scope="{ node, data }">
- <span>{{ 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>
- <!-- <span style="color:red;" v-show="data.sttm!=''&&data.entm!=''">{{data.sttm}}/{{data.entm}}
- </span> -->
- <span>
- <!-- <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>
- </span>
- </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%;">
- <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-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"
- list-type="doc/docx/pdf"
- :file-list="fileList"
- :on-error="fileUpErr"
- :on-change="fileChange"
- :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="currentSelectTreeNodeId" @addSuccess="RenYuanaAddSuccessHandler"></editDczInfo>
- <editDcdxInfo ref="editDcdxInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler"></editDcdxInfo>
- <!-- 新建督查组对话框 -->
- <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 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,
- duChaRenYuanList:resolve => {require(['../duChaGuanLi/duChaRenYuanList.vue'],resolve)},
- editDczInfo:resolve => {require(['./editDczInfo.vue'],resolve)},
- editDcdxInfo:resolve => {require(['./editDcdxInfo.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:2,
- 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'
- },
- guId:function(){
- return localStorage.getItem("guid")? localStorage.getItem("guid"): '000'
- },
- 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"): ''
- }
- },
- 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.guId;
- obj.type = '1';
- obj.code = this.guId;
- // 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(',')
- },
- // selectChange(val){
- // var _self = this;
- // console.log(val);
- // _self.fileName = "";
- // for(var i=0;i<this.planList.length;i++){
- // if(val == this.planList[i].schmId){
- // this.currentDuChaInformation = this.planList[i];
- // this.currentDuChaInformation['niandu']=this.currentDuChaInformation.schmSttm.split('-')[0];
- // this.duChaType = this.currentDuChaInformation.schmType;
- // // this.d
- // // _self.duChaType = _self.planList[i].type;
- // _self.duChaCode = _self.planList[i].guid.trim();
- // _self.treeData = [];
- // _self.firstMakeTree = true;
- // _self.currentSelectTreeNodeName = '';
- // _self.currentSelectTreeNodeCode = '';
- // _self.currentSelectTreeNodeType = '';
- // _self.plnaTreeCode = '';
- // _self.plnaTreeName = '';
- // _self.plnaTreeType = '';
- // let objName = _self.staticJIGOUData[_self.guId] ;
- // let objtype = 2;
- // let objCode = _self.guId;
- // _self.treeData.push({
- // 'guid' : objCode,
- // 'userId' : _self.guId,
- // 'type' : '1',
- // 'code' : objCode,
- // 'name' : objName
- // });
- // // if(_self.guId!='000'){
- // // let objName = _self.staticJIGOUData[_self.guId] ;
- // // let objCode = _self.guId + _self.duChaCode;
- // // let objtype = 2;
- // // _self.treeData.push({
- // // 'guid' : objCode,
- // // 'userId' : _self.guId,
- // // 'type' : '2',
- // // 'code' : objCode,
- // // 'name' : objName
- // // });
- // // }else{
- // // ['100','101','102','103','104','105','106','107','108','109','110'].forEach((element)=>{
- // // let objName = _self.staticJIGOUData[_self.element] ;
- // // // let objCode = _self.element+_self.duChaCode;
- // // let objCode = _self.element+_self.duChaCode;
- // // let objtype = 2;
- // // _self.treeData.push(
- // // {
- // // 'guid' : objCode,
- // // 'userId' : _self.guId,
- // // 'type' : '2',
- // // 'code' : objCode,
- // // 'name' : objName
- // // }
- // // )
- // // });
- // // }
- // console.log(this.duChaType);
- // }
- // }
- // findFileByBiz(val).then(response=>{
- // if(response.data){
- // _self.fileObj = response.data[0];
- // _self.pdfTitle = response.data[0].filePath;
- // _self.fileName = response.data[0].fileTitle;
- // }
- // })
- // },
- //根据机构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.guId}}).then((res)=>{
- // _self.planList = res.data;
- // _self.duChaType = res.data[0].type;
- // _self.duChaCode = res.data[0].guid.trim();
- // _self.duChaName = res.data[0].schmTitle;
- // _self.currentDuChaInformation = res.data[0];
- // _self.currentDuChaInformation['niandu']=_self.currentDuChaInformation.schmSttm.split('-')[0];
- // findFileByBiz(_self.currentDuChaInformation.schmId).then(response=>{
- // if(response.data){
- // _self.fileObj = response.data[0];
- // _self.pdfTitle = response.data[0].filePath;
- // _self.fileName = response.data[0].fileTitle;
- // }
- // })
- let objName = _self.staticJIGOUData[_self.guId] ;
- let objCode = _self.guId;
- let objtype = 2;
- _self.treeData.push({
- 'guid' : objCode,
- 'userId' : _self.guId,
- 'type' : '1',
- 'code' : objCode,
- 'name' : objName
- });
- // if(_self.guId!='000'){
- // let objName = _self.staticJIGOUData[_self.guId] ;
- // let objCode = _self.guId + _self.duChaCode;
- // let objtype = 2;
- // _self.treeData.push({
- // 'guid' : objCode,
- // 'userId' : _self.guId,
- // 'type' : '2',
- // 'code' : objCode,
- // 'name' : objName
- // });
- // }else{
- // ['100','101','102','103','104','105','106','107','108','109','110'].forEach((element)=>{
- // let objName = _self.staticJIGOUData[_self.element] ;
- // let objCode = _self.element;
- // let objtype = 2;
- // _self.treeData.push(
- // {
- // 'guid' : objCode,
- // 'userId' : _self.guId,
- // 'type' : '2',
- // '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.guId;//发文单位代码
- obj.guid = this.guId;//机构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':'002'}}).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.guId
- 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.guId,
- '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.guId,
- '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);
- },
- 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.guId,
- '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.guId,
- '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();
- },
- },
- }
- </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;
- }
- .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>
|