134940dc4a764071db8e3f2d66a1f85afb36b855.svn-base 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. <template>
  2. <div class="edit_baseInfo">
  3. <div class="plan_container" style="display:none;">
  4. <div class="title_container">
  5. <div class="title_container">
  6. <p style="font-weight:bolder;">选择计划</p>
  7. <el-select v-model="defaultPlan" :placeholder="duChaName" size="medium" style="margin-left:10px;">
  8. <el-option
  9. v-for="(item,index) in planList"
  10. :key="index"
  11. :label="item.schmTitle"
  12. :value="item.schmId"
  13. >
  14. </el-option>
  15. </el-select>
  16. </div>
  17. <div class="title_container">
  18. <el-button v-if="userType == '1'" @click="createNewPlan" class="new_plan" type="primary" size="medium" icon="el-icon-circle-plus" plain>新建督查计划</el-button>
  19. </div>
  20. </div>
  21. <p> <span class="hrall"></span></p>
  22. <div class="plan_content">
  23. <el-card class="box-card" style="background-color:#ECF8FF">
  24. <div style="display:flex;">
  25. <p class="file_info">
  26. <span>年度:{{currentDuChaInformation.niandu}}</span>
  27. <span>公文号:{{currentDuChaInformation.schmNum}}</span>
  28. <span>发文单位:{{currentDuChaInformation.schmCdpname}}</span>
  29. <span>发文时间:{{currentDuChaInformation.schmSttm}}</span>
  30. </p>
  31. <div style="width: 30%;text-align: center;">
  32. <span>相关附件:</span>
  33. <span @click="showPdfGzfa" style="cursor:pointer;color: blue;text-decoration: underline;">{{this.fileName}}</span>
  34. </div>
  35. </div>
  36. </el-card>
  37. </div>
  38. </div>
  39. <p><span style="width:120px;padding-left: 10px;">水利工程运行督查 > 督查分工</span><span class="hrs"></span></p>
  40. <div class="info_content" :style="{'height':contentHeight+'px'}" style="display:flex;flex-direction:row;justify-contnet:space-around;align-items:center;">
  41. <el-row style="height:100%;width:100%;" :gutter="20" id="contentRow">
  42. <el-col :span="9" style="height:100%;">
  43. <div class="grid-content bg-purple" style="height:100%;">
  44. <el-card class="box-card" style="height:100%;">
  45. <div slot="header" class="clearfix">
  46. <span>分工节点</span>
  47. </div>
  48. <!-- 左侧树 -->
  49. <div>
  50. <el-tree
  51. :highlight-current="true"
  52. style="height:100%;"
  53. :data="treeData"
  54. node-key="id"
  55. :expand-on-click-node="false"
  56. @node-click = 'treeNodeClickHandler'
  57. @node-expand = 'treeOpened'
  58. ref="jigou_tree"
  59. >
  60. <div class="custom-tree-node" slot-scope="{ node, data }">
  61. <span style="float:left:">{{ data.pnm}}
  62. <!-- <el-button v-if="data.type == '2'"
  63. type="text danger"
  64. icon="el-icon-circle-close"
  65. size="mini"
  66. style='color:red'
  67. @click="() => deletePICI(node, data)">
  68. </el-button> -->
  69. <el-button v-if="data.id.length > 6 && userInThisGroup(data) && hasPriv1('manage')"
  70. type="text danger"
  71. icon="el-icon-circle-close"
  72. size="mini"
  73. style='color:red'
  74. @click="() => deletePICI(node, data)">
  75. </el-button>
  76. <!-- <el-button v-if="data.type == '4'"
  77. type="text danger"
  78. icon="el-icon-circle-close"
  79. size="mini"
  80. style='color:red'
  81. @click="() => deleteZU(node, data)"> -->
  82. <!-- </el-button> -->
  83. </span>
  84. <div style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;">
  85. <!-- <span style="color:blue;margin-right:20%;" v-show="data.sttm!=''&&data.entm!=''">{{data.sttm}}/{{data.entm}}
  86. </span> -->
  87. <span style="color:blue;width:80px;">
  88. <!-- <el-button v-if="data.type == '1' && data.code != '100'"
  89. type="text"
  90. icon="el-icon-circle-plus"
  91. size="mini"
  92. @click="() => addPICI(node,data,'计划')">
  93. 新建计划
  94. </el-button> -->
  95. <el-button v-if="data.id.length < 10 && hasPriv1('manage')"
  96. type="text"
  97. icon="el-icon-circle-plus"
  98. size="mini"
  99. @click="() => addPICI(node,data,'批次')">
  100. 新建
  101. </el-button>
  102. <!-- <el-button v-if="data.type == '3'"
  103. type="text"
  104. icon="el-icon-circle-plus"
  105. size="mini"
  106. @click="() => addZU(node,data)">
  107. 添加督查组
  108. </el-button> -->
  109. </span>
  110. </div>
  111. </div>
  112. </el-tree>
  113. </div>
  114. </el-card>
  115. </div>
  116. </el-col>
  117. <el-col :span="15" style="height:100%;">
  118. <div class="grid-content bg-purple" style="height:100%;">
  119. <el-card class="box-card" style="height:100%;">
  120. <!-- <div slot="header" class="clearfix">
  121. <span>详情</span>
  122. </div> -->
  123. <!-- 右侧组件 -->
  124. <el-tabs v-model="activeContent" type="card" style="height:100%;width: 100%;">
  125. <el-tab-pane label="督查人员" name="first" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
  126. <duChaRenYuanList v-if="showRightComponent" ref="renYuanList" :objType="duChaType" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName" @showEditDialog="showEditDialog" ></duChaRenYuanList>
  127. </el-tab-pane>
  128. <el-tab-pane label="督查对象" name="second" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
  129. <duChaDuiXiangList v-if="showRightComponent" ref="duiXiangList" :objType="duChaType" :plnaId ="plnaTreeCode" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName"
  130. @showEditDialog_dx="showEditDialog_dx" @selectObjChange="selectObjChange" @emitCurrentObjSelectName="emitCurrentObjSelectName"></duChaDuiXiangList>
  131. </el-tab-pane>
  132. <!-- <el-tab-pane label="督查区域" name="third" style="overflow:auto" :style="{'height':(tabContentHeight-120)+'px'}" >
  133. <duChaQuYuList v-if="showRightComponent && duChaType=='5'" ref="qyList" :objType="duChaType" :dczId="currentSelectTreeNodeId" :dczName="currentSelectTreeNodeName"
  134. @showEditDialog="showEditDialog_qy" @selectObjChange="selectObjChange" @emitCurrentObjSelectName="emitCurrentObjSelectName"></duChaQuYuList>
  135. </el-tab-pane> -->
  136. </el-tabs>
  137. </el-card>
  138. </div>
  139. </el-col>
  140. </el-row>
  141. </div>
  142. <!-- <el-button type="primary" size="large" style="float:right;margin-right:10px;">下 发</el-button>
  143. <el-button type="primary" size="large" style="float:right;margin-right:10px;">保存</el-button> -->
  144. <!-- 新建督查计划话框 -->
  145. <el-dialog title="新建督查计划" :visible.sync="addPlanDialogVisible">
  146. <el-form :model="duchaForm" :label-width="formLabelWidth" class="ducha_form">
  147. <el-form-item label="公文号">
  148. <el-input v-model="duchaForm.wenhao" placeholder="请输入内容"></el-input>
  149. </el-form-item>
  150. <el-form-item label="时间范围">
  151. <el-date-picker
  152. v-model="duchaForm.startDate"
  153. type="daterange"
  154. range-separator="至"
  155. start-placeholder="开始日期"
  156. end-placeholder="结束日期"
  157. value-format="yyyy-MM-dd"
  158. @blur="formInfo.date == '' ? showTipsTime = 1 : showTipsTime = 0">
  159. </el-date-picker>
  160. </el-form-item>
  161. <el-form-item label="计划名称">
  162. <el-input v-model="duchaForm.name" placeholder="请输入内容"></el-input>
  163. </el-form-item>
  164. <el-form-item label="类型">
  165. <el-select v-model="duchaForm.type" placeholder="请选择">
  166. <el-option
  167. v-for="item in options"
  168. :key="item.value"
  169. :label="item.label"
  170. :value="item.value">
  171. </el-option>
  172. </el-select>
  173. </el-form-item>
  174. <el-form-item label="发文单位">
  175. <span style="font-size: 12px;color: #888"> 监督司</span>
  176. </el-form-item>
  177. <el-form-item label="接收单位">
  178. <!-- <el-tree :data="treeDataForNewPlan" :props="defaultProps" @node-click="handleNodeClick"></el-tree> -->
  179. <el-checkbox-group v-model="duchaForm.receiveUnit">
  180. <el-checkbox v-for="item in lyjgList" :key="item.orgCode" :label="item.orgName"></el-checkbox>
  181. </el-checkbox-group>
  182. </el-form-item>
  183. <el-form-item label="抄送单位">
  184. <el-checkbox-group v-model="duchaForm.copyUnit">
  185. <el-checkbox v-for="item in lyjgList" :key="item.orgCode" :label="item.orgName"></el-checkbox>
  186. </el-checkbox-group>
  187. </el-form-item>
  188. <el-form-item label="附件">
  189. <el-upload
  190. class="upload-demo"
  191. action="/pdcApi/file/insert"
  192. :data="formData"
  193. :on-remove="handleRemove"
  194. :file-list="fileList"
  195. :on-error="fileUpErr"
  196. :on-success="fileSuccess">
  197. <el-button size="small" type="primary">点击上传</el-button>
  198. <div slot="tip" class="el-upload__tip">只能上传doc/pdf文件,且不超过500kb</div>
  199. </el-upload>
  200. </el-form-item>
  201. </el-form>
  202. <div slot="footer" class="dialog-footer">
  203. <el-button @click="addPlanDialogVisible = false">取 消</el-button>
  204. <el-button type="primary" @click="appendPlan" >确 定</el-button>
  205. </div>
  206. </el-dialog>
  207. <!-- 新建批次对话框 -->
  208. <el-dialog :title="'新建' + addTypeText" :visible.sync="addPICIDialogVisible">
  209. <el-form :model="piciForm" :label-width="formLabelWidth">
  210. <el-form-item :label="addTypeText + '名称'">
  211. <el-input v-model="piciForm.name" placeholder="请输入内容"></el-input>
  212. </el-form-item>
  213. <el-form-item label="时间范围" v-if="currentSelectTreeNodeId.length > 3">
  214. <el-date-picker
  215. v-model="piciForm.startDate"
  216. type="daterange"
  217. range-separator="至"
  218. start-placeholder="开始日期"
  219. end-placeholder="结束日期"
  220. value-format="yyyy-MM-dd"
  221. @blur="formInfo.date == '' ? showTipsTime = 1 : showTipsTime = 0">
  222. </el-date-picker>
  223. </el-form-item>
  224. </el-form>
  225. <div slot="footer" class="dialog-footer">
  226. <el-button @click="addPICIDialogVisible = false">取 消</el-button>
  227. <el-button type="primary" @click="appendPICI" >确 定</el-button>
  228. </div>
  229. </el-dialog>
  230. <editDczInfo ref="editDczInfoRef" :dczId="currentSelectTreeNodeId" :jiGouId="orgId" @addSuccess="RenYuanaAddSuccessHandler"></editDczInfo>
  231. <editDcdxInfoyunxing ref="editDcdxInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler"></editDcdxInfoyunxing>
  232. <!-- <editDcdxInfo ref="editDcdxInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler"></editDcdxInfo> -->
  233. <editDcqyInfo ref="editDcqyInfoRef" :objType="duChaType" :plnaId ="currentSelectTreeNodeId" :dczId="currentSelectTreeNodeId" @addSuccess="quYuAddSuccessHandler"></editDcqyInfo>
  234. <!-- 新建督查组对话框 -->
  235. <el-dialog title="新建督查组" :visible.sync="addZuDialogVisible">
  236. <el-form :model="zuForm" class="duchazu_form">
  237. <el-form-item label="督查组名称" :label-width="formLabelWidth">
  238. <el-input v-model="zuForm.name" placeholder="请输入内容"></el-input>
  239. </el-form-item>
  240. <!-- <el-form-item label="组长" :label-width="formLabelWidth">
  241. <el-select v-model="zuForm.leaderCode" placeholder="请选择督查组组长" @change="zuLeaderChange">
  242. <el-option v-for="person in jigourenyuan" :label="person.personName" :key="person.personCode" :value="person.personCode"></el-option>
  243. </el-select>
  244. </el-form-item> -->
  245. <el-form-item label="督查组员" :label-width="formLabelWidth">
  246. <el-input placeholder="请输入姓名" v-model="member_search" style="width: 200px;padding-bottom: 10px;" class="input-with-select">
  247. <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
  248. </el-input>
  249. </el-form-item>
  250. <el-form-item label="" :label-width="formLabelWidth">
  251. <!-- <el-transfer
  252. style="text-align: left; display: inline-block"
  253. v-model="zuForm.member"
  254. :props="{
  255. key: 'personCode',
  256. label: 'personName'
  257. }"
  258. :titles="['机构人员', '组员']"
  259. @change="zuMemberChange"
  260. :data="jigourenyuan">
  261. </el-transfer> -->
  262. <el-table border :data="currentShowList" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"
  263. ref="multipleTable" :row-class-name="tableRowClassName">
  264. <el-table-column type="selection" width="40"></el-table-column>
  265. <el-table-column prop="persName" width="100" label="姓名"></el-table-column>
  266. <el-table-column prop="sex" label="性别" width="50">
  267. <template slot-scope="scope">
  268. <span>{{scope.row.sex == '1' ? '女' : '男'}}</span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="telnumb" label="电话"></el-table-column>
  272. <el-table-column prop="status" label="在职状态">
  273. <template slot-scope="scope">
  274. <span>{{scope.row.status == '1' ? '在岗' : '离岗'}}</span>
  275. </template>
  276. </el-table-column>
  277. <el-table-column prop="bornPlac" label="户籍"></el-table-column>
  278. <el-table-column label="操作">
  279. <template slot-scope="scope">
  280. <!-- <el-radio v-model="radio" label="scope.persCode" @change="addGroupLeader(scope.row,$event)"></el-radio> -->
  281. <span :class="{'blue': isGroupLeader === scope.$index}" @click="addGroupLeader(scope,$event)" style="cursor:pointer">设置组长</span>
  282. </template>
  283. </el-table-column>
  284. </el-table>
  285. <div class="block" style="display:flex;flex-direction:row;justify-content:center;align-items:center;padding-top: 5px;background-color: #fff;">
  286. <el-pagination
  287. small
  288. @current-change="handleCurrentChange"
  289. :pager-count="5"
  290. :current-page.sync="pageIndex"
  291. :page-size="pageSize"
  292. layout="total, prev, pager, next"
  293. :total="total">
  294. </el-pagination>
  295. </div>
  296. </el-form-item>
  297. </el-form>
  298. <div slot="footer" class="dialog-footer">
  299. <el-button @click="addZuDialogVisible = false">取 消</el-button>
  300. <el-button type="primary" @click='appendZU' >确 定</el-button>
  301. </div>
  302. </el-dialog>
  303. <!-- 管理人员框 -->
  304. <transition name="fade">
  305. <draggable v-if="showDetailpdfGzfa" initWidth=1000 initHeight=650 title="" style="z-index: 50000;top: 60px;left: 165px;background-color:white;" @closeDraggable="hiddenDetailGzfa">
  306. <div class="" style="height:100%;background-color:rgba(249,249,249,0.7);border-radius:0px 0px 10px 10px;padding-bottom: 10px;">
  307. <iframe id="gzfaPdf" width="100%" height="100%" :src="pdfTitle" color="white" background-color="white" currentScaleValue="page-width"></iframe>
  308. </div>
  309. </draggable>
  310. </transition>
  311. </div>
  312. </template>
  313. <script>
  314. import request from '../../utils/gw_ajax_request.js';
  315. import index from '../../router';
  316. import duChaDuiXiangList from '../duChaGuanLi/duChaDuiXiangList_xsk.vue';
  317. import duChaQuYuList from '../duChaGuanLi/duChaQuYuList.vue';
  318. import draggable from '../../widgets/draggable.vue'
  319. import {dateFormat} from '../../utils/gw_date.js'
  320. import {createNewDcPlan,findFileByBiz,getProvincialOrgList} from '../../api/duChaPlan.js'
  321. export default {
  322. props: [],
  323. components: {
  324. draggable,
  325. 'duChaDuiXiangList':duChaDuiXiangList,
  326. 'duChaQuYuList':duChaQuYuList,
  327. duChaRenYuanList:resolve => {require(['../duChaGuanLi/duChaRenYuanList.vue'],resolve)},
  328. editDczInfo:resolve => {require(['./editDczInfo.vue'],resolve)},
  329. editDcdxInfo:resolve => {require(['./editDcdxInfo.vue'],resolve)},
  330. editDcdxInfoyunxing:resolve => {require(['./editDcdxInfo_yunxing.vue'],resolve)},
  331. editDcqyInfo:resolve => {require(['./editDcqyInfo.vue'],resolve)},
  332. },
  333. data() {
  334. return {
  335. showRightComponent:false,
  336. contentHeight:window.innerHeight - 165,
  337. options: [
  338. {
  339. value: '1',
  340. label: '小水库督查计划'
  341. }, {
  342. value: '2',
  343. label: '农村饮用水工程督查计划'
  344. }, {
  345. value: '3',
  346. label: '水毁工程督查计划'
  347. }],
  348. lyjgList:[
  349. ],
  350. checkList:[],
  351. checkList1:[],
  352. pageIndex:1,
  353. pageSize:10,
  354. total:0,
  355. currentShowList:[],
  356. input5:'',
  357. formData:'',
  358. fileList:[],
  359. activeContent:'first',
  360. defaultPlan:'',
  361. dczInfo:{},
  362. dcdxInfo:{},
  363. // showEditDczInfo:false,
  364. duChaType:7,
  365. duChaCode:'',
  366. duChaName:'',
  367. planList: [],//督查列表
  368. fileUpData:[],//文件上传之后返回的文件信息
  369. tabContentHeight:0,
  370. deleteFlag:false,
  371. //业务用
  372. addPlanDialogVisible: false,
  373. addZuDialogVisible:false,
  374. addPICIDialogVisible:false,
  375. currentDuChaInformation:{
  376. "guid": "",
  377. "schmId": "",
  378. "schmNum": "",
  379. "schmTitle": "",
  380. "schmMkps": "",
  381. "schmType": "",
  382. "schmCdpcode": "",
  383. "schmSttm": "",
  384. "schmEnttm": "",
  385. "schmIntm": "",
  386. "schmUptm": '',
  387. "schmNote": "",
  388. "receiveDept": null,
  389. "copyDept": null,
  390. "fileList": null
  391. },
  392. //督查计划信息
  393. duchaForm:{
  394. wenhao: '',
  395. name:'',
  396. type:'',
  397. startDate:'',
  398. sendUnit: '监督司',
  399. receiveUnit: [],
  400. copyUnit: []
  401. },
  402. formLabelWidth:'120px',
  403. treeParams: {
  404. 'guid': '',
  405. 'userId': '',
  406. 'type': '',
  407. 'code': ''
  408. },
  409. treeData:[],
  410. organizationTree: [],
  411. addPICITreeNode:'',
  412. addZUTreeNode:'',
  413. //test
  414. addZuDialogVisible:false,
  415. zuForm: {
  416. name:'',
  417. leaderCode:'',
  418. leaderName:'',
  419. member:[],
  420. dist:'',
  421. target:[],
  422. },
  423. piciForm:{
  424. name:'',
  425. startDate:'',
  426. endDate:'',
  427. },
  428. jigourenyuan:[
  429. ],
  430. defaultProps: {
  431. children: 'children',
  432. label: 'label'
  433. },
  434. currentSelectTreeNodeName:'',
  435. currentSelectTreeNodeCode:'',
  436. currentSelectTreeNodeType:'',
  437. currentSelectTreeNodeId:'',
  438. plnaTreeCode:'',
  439. plnaTreeName:'',
  440. plnaTreeType:'',
  441. currentShowList:[
  442. // {
  443. // name: '张三',
  444. // tel: '110',
  445. // position: '处长',
  446. // jobTitle: '大师',
  447. // office: '黄河流域委员会'
  448. // },
  449. // {
  450. // name: '李四',
  451. // tel: '110',
  452. // position: '处长',
  453. // jobTitle: '大师',
  454. // office: '黄河流域委员会'
  455. // }
  456. ],
  457. isGroupLeader: '',
  458. groupLeaderId: '',
  459. memberId: '',
  460. memberIds: [],
  461. member_search: '',
  462. defaultDC: '',
  463. showDetailpdfGzfa:false,
  464. pdfTitle:'',
  465. fileName:'',
  466. fileObj:{},//存储文件相关对象
  467. firstMakeTree:true,
  468. staticJIGOUData:{
  469. '100':'水利部',
  470. '101':' 长江水利委员会',
  471. '102':'黄河水利委员会',
  472. '103':'淮河水利委员会',
  473. '104':'海河水利委员会',
  474. '105':'珠江水利委员会',
  475. '106':'松辽水利委员会',
  476. '107':'太湖流域管理局',
  477. '108':'中国水利水电科学研究院',
  478. '109':'中国灌溉排水发展中心',
  479. '110':'部督查办',
  480. },
  481. addType: '',
  482. addTypeText: '',
  483. }
  484. },
  485. computed:{
  486. userId:function(){
  487. return localStorage.getItem("userid")? localStorage.getItem("userid"): '1098101939614724096'
  488. },
  489. userInAllNode:function(){//当前登录用户所在的所有组信息
  490. return JSON.parse(localStorage.getItem("allNode"))? JSON.parse(localStorage.getItem("allNode")): []
  491. },
  492. orgId() {
  493. return localStorage.getItem("guid") ? localStorage.getItem("guid") : "";
  494. },
  495. orgName(){
  496. return localStorage.getItem("orgName")? localStorage.getItem("orgName"): ''
  497. },
  498. userType(){
  499. return localStorage.getItem("userType")? localStorage.getItem("userType"): '1'
  500. },
  501. currentShowLists:function(){
  502. return this.currentShowList.filter(item => item.persName.indexOf(this.member_search) > -1)
  503. },
  504. isAdmin:function(){
  505. return localStorage.getItem("isAdmin")? localStorage.getItem("isAdmin"): ''
  506. }
  507. },
  508. watch:{
  509. },
  510. mounted(){
  511. this.getPlanlist()
  512. this.getLeftTreeData();
  513. // this.getProvince()
  514. this.tabContentHeight = document.getElementById('contentRow').offsetHeight;
  515. this.showRightComponent = true;
  516. },
  517. methods:{
  518. hasPriv1(item){
  519. return this.ownPriv(item)
  520. },
  521. //判断当前用户 是否在该节点下 在 则没有删除权限
  522. userInThisGroup(item){
  523. var _self = this;
  524. if(_self.userInAllNode && _self.userInAllNode.length>0){
  525. for(var i=0;i<_self.userInAllNode.length;i++){
  526. if(_self.userInAllNode[i].id.substring(0,3)=='001'){
  527. if(item.id.length>_self.userInAllNode[i].id.length){
  528. return true;
  529. }else{
  530. return false;
  531. }
  532. }else{
  533. return true;
  534. }
  535. }
  536. }else{
  537. return true;
  538. }
  539. },
  540. tableRowClassName({row, rowIndex}) {
  541. if (rowIndex === this.isGroupLeader) {
  542. return 'zuzhang';
  543. }
  544. return '';
  545. },
  546. hiddenDetailGzfa:function(){
  547. this.showDetailpdfGzfa = false;
  548. },
  549. showPdfGzfa:function(){
  550. var pdfUrl = this.fileObj;
  551. if(pdfUrl.filePath.substring(pdfUrl.filePath.length-3) == 'doc' ||pdfUrl.filePath.substring(pdfUrl.filePath.length-4) == 'docx'){
  552. window.open('/pdcApi/'+pdfUrl.filePath);
  553. this.showDetailpdfGzfa = false;
  554. }else if(pdfUrl.filePath.substring(pdfUrl.filePath.length-3) == 'pdf'){
  555. this.showDetailpdfGzfa = true;
  556. this.pdfTitle = '/pdcApi/'+pdfUrl.filePath;
  557. };
  558. },
  559. createNewPlan(){
  560. this.addPlanDialogVisible = true;
  561. this.fileName = "";
  562. this.fileList = [];
  563. this.fileUpData = [];
  564. this.duchaForm = {
  565. wenhao: '',
  566. name:'',
  567. type:'',
  568. startDate:'',
  569. sendUnit: '监督司',
  570. receiveUnit: [],
  571. copyUnit: []
  572. };
  573. this.getTreeForNewPlan();
  574. },
  575. getTreeForNewPlan(){
  576. var _self = this;
  577. var obj = {};
  578. obj.guid = this.orgId;
  579. obj.type = '1';
  580. obj.code = this.orgId;
  581. // request.get('/dc/organization/base/getOrganizationTreeByGuidAndOthers',{params:obj}).then((res)=>{
  582. // _self.lyjgList = res.data;
  583. // })
  584. getProvincialOrgList().then(res=>{
  585. _self.lyjgList = res.data;
  586. })
  587. },
  588. zuMemberChange(){
  589. },
  590. zuLeaderChange(){
  591. },
  592. addGroupLeader(scope,event){
  593. this.isGroupLeader = scope.$index
  594. this.groupLeaderId = scope.row.guid
  595. this.memberIds.forEach((ele)=>{
  596. if(this.groupLeaderId == ele){
  597. console.log('选择组长')
  598. this.$refs.multipleTable.toggleRowSelection(scope.row,false)
  599. }
  600. })
  601. },
  602. handleSelectionChange(selection){
  603. // if(selection[selection.length - 1].guid == this.groupLeaderId){
  604. // selection.splice[selection.length - 1,1]
  605. // }
  606. this.memberIds = []
  607. console.log(selection)
  608. selection.forEach(element => {
  609. this.memberIds.push(element.guid)
  610. });
  611. this.memberId = this.memberIds.join(',')
  612. },
  613. //根据机构ID获取计划列表
  614. changePlan(data){
  615. this.planList.forEach((ele)=>{
  616. if(ele.schmId == data){
  617. this.defaultDC = ele
  618. }
  619. })
  620. },
  621. getPlanlist(){
  622. var _self = this;
  623. request.get('/dc/insp/scheme/getDCFAListByOrgId',{params:{'id': _self.orgId}}).then((res)=>{
  624. let objName = _self.staticJIGOUData[_self.orgId] ;
  625. let objCode = _self.orgId;
  626. let objtype = 2;
  627. _self.treeData.push({
  628. 'guid' : objCode,
  629. 'userId' : _self.orgId,
  630. 'type' : '1',
  631. 'code' : objCode,
  632. 'name' : objName
  633. });
  634. });
  635. },
  636. appendPlan(){
  637. var _self = this;
  638. var obj = {};
  639. var str_recieve = '';
  640. var str_copy = '';
  641. for(var i=0;i<this.lyjgList.length;i++){
  642. for(var j=0;j<this.duchaForm.receiveUnit.length;j++){
  643. if(this.lyjgList[i].orgName == this.duchaForm.receiveUnit[j]){
  644. str_recieve+=this.duchaForm.receiveUnit[j]+',';
  645. }
  646. }
  647. }
  648. for(var m=0;m<this.lyjgList.length;m++){
  649. for(var n=0;n<this.duchaForm.copyUnit.length;n++){
  650. if(this.lyjgList[m].orgName == this.duchaForm.copyUnit[n]){
  651. str_copy+=this.duchaForm.copyUnit[n]+',';
  652. }
  653. }
  654. }
  655. obj.schmNum = this.duchaForm.wenhao;//公文号
  656. obj.schmTitle = this.duchaForm.name;//计划名称
  657. obj.schmType = this.duchaForm.type;//类型
  658. obj.schmCdpcode = this.orgId;//发文单位代码
  659. obj.guid = this.orgId;//机构ID
  660. obj.schmSttm = this.duchaForm.startDate[0];
  661. obj.schmEnttm = this.duchaForm.startDate[1];
  662. obj.receiveDept = str_recieve;
  663. obj.copyDept = str_copy;
  664. obj.fileList = this.fileUpData;
  665. var params = {
  666. 'bisInspScheme':obj
  667. };
  668. request.post('/dc/insp/scheme',obj).then((res)=>{
  669. _self.getPlanlist()
  670. })
  671. // createNewDcPlan({'bisInspScheme':obj});
  672. this.addPlanDialogVisible = false
  673. },
  674. //根据用户id获取左侧树
  675. getLeftTreeData(){
  676. var _self = this;
  677. request.get('/dc/organization/base/getAllNode',{params:{'userId':this.userId,'orgType':'007'}}).then((res)=>{
  678. let data = res.data
  679. data.forEach(ele => {
  680. if(ele.pid == null || ele.pid == ''){
  681. ele.pid = '001'
  682. }if(ele.sttm==null || ele.sttm == ''){
  683. ele.sttm = ''
  684. }else{
  685. ele.sttm = dateFormat(ele.sttm,'yy-MM-dd');
  686. }if(ele.entm==null || ele.entm == ''){
  687. ele.entm = ''
  688. }else{
  689. ele.entm = dateFormat(ele.entm,'yy-MM-dd');
  690. }
  691. });
  692. data = _self.getTrees(data)
  693. _self.treeData = data;
  694. _self.currentSelectTreeNodeId = _self.treeData[0].id;
  695. // _self.duChaType = _self.treeData[0].id.substring(2,3);
  696. })
  697. },
  698. //格式化树形数据
  699. getTrees(list) {
  700. //@wxcwater重写方法 适应多个树
  701. let highLevelLength = 99;//预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
  702. let _self =this;
  703. list.forEach((item,index)=>{
  704. item['pidLength'] = item.pid&&item.pid!=''?item.pid.length:0;
  705. if(highLevelLength>item.pidLength){
  706. highLevelLength = item.pidLength;
  707. }
  708. });
  709. console.log(highLevelLength);
  710. let heightLevelNode = [];
  711. list.forEach((item,index)=>{
  712. if(highLevelLength>=item.pidLength){
  713. heightLevelNode.push(item);
  714. }
  715. });
  716. list.forEach((item,index)=>{
  717. heightLevelNode.forEach((pItem)=>{
  718. _self.addTreeNode(pItem,item);
  719. });
  720. });
  721. console.log(heightLevelNode);
  722. return heightLevelNode;
  723. },
  724. addTreeNode:function(treeNode,leafNode){
  725. let _self = this;
  726. if(!treeNode.hasOwnProperty('children')){
  727. treeNode['children'] = [];
  728. }
  729. if(leafNode.pid == treeNode.id){
  730. treeNode.children.push(leafNode);
  731. return;
  732. }
  733. treeNode.children.forEach((item) => {
  734. _self.addTreeNode(item,leafNode);
  735. });
  736. },
  737. loadNode(node, resolve) {
  738. if (node.level === 0) {
  739. return resolve(this.treeData);
  740. }
  741. Object.assign(this.dczInfo,node)
  742. if (node.level > 4) return resolve([]);
  743. if(node.level == 2){
  744. // this.duChaType = node.data.code
  745. }
  746. this.treeParams.type = node.data.type
  747. this.treeParams.code = node.data.code
  748. request.get('/dc/organization/base/getOrganizationTreeByParams',{params:this.treeParams}).then((res)=>{
  749. let data = res.data
  750. if(!node.data.hasOwnProperty('children')){
  751. node.data['children'] = [];
  752. }
  753. node.data['children'] = data;
  754. resolve(data)
  755. })
  756. },
  757. treeNodeClickHandler:function(data,node,tree){
  758. if(this.deleteFlag){//如果点击删除节点 则不更新节点id
  759. this.deleteFlag = false;
  760. return;
  761. }
  762. // this.duChaType = data.id.substring(2,3);
  763. this.currentSelectTreeNodeName = data.name;
  764. this.currentSelectTreeNodeCode = data.code;
  765. this.currentSelectTreeNodeType = data.type;
  766. this.currentSelectTreeNodeId = data.id;
  767. if(data.type=='3'){
  768. this.plnaTreeCode = data.code;
  769. this.plnaTreeName = data.name;
  770. this.plnaTreeType = data.type;
  771. }
  772. },
  773. treeOpened(data,node,tree){
  774. this.currentSelectTreeNodeName = data.name;
  775. this.currentSelectTreeNodeCode = data.code;
  776. this.currentSelectTreeNodeType = data.type;
  777. this.currentSelectTreeNodeId = data.id;
  778. if(data.type=='3'){
  779. this.plnaTreeCode = data.code;
  780. this.plnaTreeName = data.name;
  781. this.plnaTreeType = data.type;
  782. }
  783. },
  784. handleNodeClick(){},
  785. getOrganizationTree(){
  786. this.treeParams.userId = this.userId
  787. this.treeParams.guid = this.orgId
  788. request.get('/dc/organization/base/getOrganizationTreeByParams',{params:this.treeParams}).then((res)=>{
  789. this.organizationTree = res.data
  790. this.treeData = this.organizationTree
  791. })
  792. },
  793. appendPICI() {
  794. console.log(this.addPICITreeNode)
  795. var _self = this;
  796. // let params = {
  797. // 'guid': this.addPICITreeNode.code,
  798. // 'prsnTitle': this.piciForm.name,
  799. // 'prsnId': this.userId,
  800. // 'palnSttm': this.piciForm.startDate[0],
  801. // 'palnEntm': this.piciForm.startDate[1]
  802. // }
  803. let params = {
  804. 'prsnTitle': this.piciForm.name,
  805. 'guid': this.addPICITreeNode.id,
  806. 'palnSttm': this.piciForm.startDate[0],
  807. 'palnEntm': this.piciForm.startDate[1]
  808. }
  809. request.post('/dc/insp/plan/addBisInspPlan',params).then((res)=>{
  810. const newChild = { id:res.data.code , pid:_self.addPICITreeNode.id,pnm:_self.piciForm.name,sttm:'',entm:'', children: [] };
  811. //to-do wxcwater 改这里。
  812. _self.$refs['jigou_tree'].append(newChild,_self.addPICITreeNode.id);
  813. _self.addPICIDialogVisible = false;
  814. })
  815. },
  816. appendZU() {
  817. let params = {
  818. 'guid': this.orgId,
  819. 'headmanId': this.groupLeaderId,
  820. 'inspGroupName': this.zuForm.name,
  821. 'memberId': this.memberId,
  822. 'plnaId': this.addZUTreeNode.code,
  823. "downStat": 2,
  824. "note": "备注"
  825. }
  826. request.post('/dc/insp/group/insertGroup',params).then((res)=>{
  827. const newChild = { code:res.data.code , type:res.data.type,name:res.data.name };
  828. //to-do 改这里
  829. this.$refs['jigou_tree'].append(newChild,this.addZUTreeNode.code);
  830. this.addZuDialogVisible = false;
  831. this.isGroupLeader = ''
  832. this.zuForm.name = ''
  833. })
  834. },
  835. deletePICI:function(node,data){
  836. this.deleteFlag = true;
  837. this.$confirm('是否删除批次:'+data.pnm+'及关联督查组?', '提示', {
  838. confirmButtonText: '确定',
  839. cancelButtonText: '取消',
  840. type: 'warning'
  841. }).then(() => {
  842. request.post(`/dc/insp/plan/${node.data.id}`).then((res)=>{
  843. if(res.success){
  844. if(res.message=="请先删除人员或对象"){
  845. this.$message({
  846. type: 'warning',
  847. message: '请先删除组内人员、对象及区域!'
  848. });
  849. }else{
  850. this.$refs.jigou_tree.remove(node)
  851. this.$message({
  852. type: 'success',
  853. message: '删除成功!'
  854. });
  855. }
  856. }
  857. })
  858. }).catch(() => {
  859. this.$message({
  860. type: 'info',
  861. message: '已取消删除'
  862. });
  863. });
  864. },
  865. deleteZU:function(node,data){
  866. this.$confirm('是否删除督查组:'+data.name+'?', '提示', {
  867. confirmButtonText: '确定',
  868. cancelButtonText: '取消',
  869. type: 'warning'
  870. }).then(() => {
  871. request.post(`/dc/insp/group/delete?id=${node.data.code}`).then((res)=>{
  872. this.$refs.jigou_tree.remove(node)
  873. this.$message({
  874. type: 'success',
  875. message: '删除成功!'
  876. });
  877. })
  878. }).catch(() => {
  879. this.$message({
  880. type: 'info',
  881. message: '已取消删除'
  882. });
  883. });
  884. },
  885. afterRemove(node, data) {
  886. const parent = node.parent;
  887. const children = parent.data.children || parent.data;
  888. const index = children.findIndex(d => d.id === data.id);
  889. children.splice(index, 1);
  890. },
  891. addPICI:function(node,nodeData,addType){
  892. this.addPICITreeNode = node.data;
  893. this.addPICIDialogVisible = true;
  894. if(addType == '计划'){
  895. this.addType = 2
  896. // this.addTypeText = '计划'
  897. }else{
  898. this.addType = 3
  899. // this.addTypeText = '批次'
  900. }
  901. },
  902. addZU:function(node,nodeData){
  903. console.log(node.data)
  904. this.addZUTreeNode = node.data;
  905. this.addZuDialogVisible = true;
  906. let params = {
  907. 'orgGuid': this.orgId,
  908. 'pageSize' : this.pageSize,
  909. 'pageNum' : this.pageIndex
  910. }
  911. request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
  912. this.currentShowList = res.data.list
  913. this.total = res.data.total
  914. })
  915. },
  916. zuLeaderChange(){},
  917. zuMemberChange(){},
  918. showEditDialog(item){
  919. // this.dczInfo = item;
  920. // this.showEditDczInfo = true;
  921. this.$refs['editDczInfoRef'].showDialog();
  922. },
  923. showEditDialog_dx(item){
  924. this.$refs['editDcdxInfoRef'].showDialog(this.duChaType);
  925. },
  926. showEditDialog_qy(item){
  927. this.$refs['editDcqyInfoRef'].showDialog();
  928. },
  929. emitCurrentObjSelectName(item){
  930. this.$refs['editDcdxInfoRef'].changeCurrentObjSelectName(item);
  931. },
  932. selectObjChange(item){
  933. // this.duChaType = item;
  934. },
  935. handleRemove(){
  936. },
  937. fileChange(){
  938. },
  939. fileSuccess(item){
  940. this.fileUpData.push(item.data);
  941. console.log('上传成功',item);
  942. },
  943. fileUpErr(item){
  944. console.log(item+"wenjian");
  945. if(item.status == 413){
  946. this.$message({
  947. message: '文件大小超出500K!',
  948. type: 'warning'
  949. });
  950. }
  951. },
  952. search(){
  953. var _self = this;
  954. let params = {
  955. 'orgGuid': this.orgId,
  956. 'pageSize' : this.pageSize,
  957. 'pageNum' : this.pageIndex,
  958. 'persName':_self.member_search
  959. }
  960. request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
  961. this.currentShowList = res.data.list
  962. this.total = res.data.total
  963. })
  964. },
  965. handleCurrentChange(){
  966. let params = {
  967. 'orgGuid': this.orgId,
  968. 'pageSize' : this.pageSize,
  969. 'pageNum' : this.pageIndex
  970. }
  971. request.get('/dc/pers/base/findList', {params:params}).then((res)=>{
  972. this.currentShowList = res.data.list
  973. this.total = res.data.total
  974. })
  975. },
  976. RenYuanaAddSuccessHandler:function(){
  977. this.$refs['renYuanList'].getDcryResult();
  978. },
  979. DuiXiangAddSuccessHandler:function(){
  980. this.$refs['duiXiangList'].getDcdxList1();
  981. },
  982. quYuAddSuccessHandler:function(){
  983. this.$refs['qyList'].getDcqyResult();
  984. },
  985. },
  986. }
  987. </script>
  988. <style>
  989. .el-table .zuzhang {
  990. background:#f0f9eb;
  991. }
  992. .edit_baseInfo{
  993. width: 100%;
  994. height:100%;
  995. padding: 20px;
  996. box-sizing: border-box;
  997. }
  998. .edit_baseInfo h3{
  999. line-height: 30px;
  1000. font-size: 16px;
  1001. color: #333;
  1002. font-weight: normal;
  1003. }
  1004. .edit_baseInfo .info_content{
  1005. padding: 10px 10px 10px 10px;
  1006. font-size: 14px;
  1007. overflow: hidden;
  1008. }
  1009. .edit_baseInfo .el-col {
  1010. border-radius: 4px;
  1011. /* margin-right: 20px; */
  1012. }
  1013. .edit_baseInfo .bg-purple-dark {
  1014. background: #99a9bf;
  1015. }
  1016. .edit_baseInfo .bg-purple {
  1017. background: #d3dce6;
  1018. }
  1019. .edit_baseInfo .el-card__header{
  1020. padding: 8px 20px;
  1021. }
  1022. .edit_baseInfo .text {
  1023. font-size: 14px;
  1024. cursor: pointer;
  1025. }
  1026. .edit_baseInfo .text:hover{
  1027. background-color: #eee;
  1028. }
  1029. .edit_baseInfo .item {
  1030. padding: 5px;
  1031. }
  1032. .edit_baseInfo .clearfix:before,
  1033. .edit_baseInfo .clearfix:after {
  1034. display: table;
  1035. content: "";
  1036. }
  1037. .edit_baseInfo .clearfix:after {
  1038. clear: both
  1039. }
  1040. .plan_container .plan_content{
  1041. /* height: 200px; */
  1042. padding: 10px 20px;
  1043. font-size: 14px;
  1044. }
  1045. .plan_container .plan_content .el-card.is-always-shadow{
  1046. box-shadow: 0 2px 6px 0 rgba(0,0,0,.1)
  1047. }
  1048. .plan_container h2{
  1049. margin-bottom: 10px;
  1050. font-size: 22px;
  1051. color: #333;
  1052. }
  1053. .plan_container h2 .el-icon-arrow-down{
  1054. font-size: 20px;
  1055. cursor: pointer;
  1056. }
  1057. .plan_container h2 span{
  1058. margin-left: 20px;
  1059. font-size: 14px;
  1060. color: #666;
  1061. font-weight: normal;
  1062. }
  1063. .plan_container .el-icon-time{
  1064. position: relative;
  1065. top: 2px;
  1066. margin-right: 6px;
  1067. font-size: 20px;
  1068. }
  1069. .plan_container ul{
  1070. width: 220px;
  1071. /* border: solid 1px #ccc; */
  1072. list-style: none;
  1073. border-radius: 3px;
  1074. box-shadow: 0 2px 6px #ccc;
  1075. position: absolute;
  1076. z-index: 9;
  1077. }
  1078. .plan_container ul li{
  1079. padding: 5px 10px;
  1080. color: #888;
  1081. }
  1082. .plan_container ul li:hover{
  1083. background-color: #eee;
  1084. cursor: pointer;
  1085. }
  1086. .title_container{
  1087. position: relative;
  1088. display:flex;
  1089. flex-direction:row;
  1090. justify-content:space-between;
  1091. align-items:center;
  1092. }
  1093. .title_container p{
  1094. display: inline-block;
  1095. font-size: 14px;
  1096. margin-left: 20px;
  1097. color: #666;
  1098. }
  1099. .hrall{
  1100. display: inline-block;
  1101. width: calc(100%);
  1102. height: 1px;
  1103. vertical-align: middle;
  1104. background-color: #ddd;
  1105. }
  1106. p .hrs{
  1107. display: inline-block;
  1108. width: calc(100% - 40px);
  1109. margin-left:10px;
  1110. height: 1px;
  1111. vertical-align: middle;
  1112. background-color: #ddd;
  1113. }
  1114. .activeListItem{
  1115. background-color:#409EFF !important;
  1116. color:white !important;
  1117. }
  1118. .listitem{
  1119. color:black;
  1120. background-color:white;
  1121. padding:3px;
  1122. transition:all .5s;
  1123. cursor:pointer;
  1124. }
  1125. .listitem:hover{
  1126. border:1px solid #409EFF;
  1127. cursor:pointer;
  1128. }
  1129. .info_content .el-card__body {
  1130. padding: 16px;
  1131. height: 88%;
  1132. overflow-y: auto;
  1133. /* display: flex; */
  1134. }
  1135. .custom-tree-node {
  1136. flex: 1;
  1137. display: flex;
  1138. align-items: center;
  1139. justify-content: space-between;
  1140. font-size: 15px;
  1141. padding-right: 8px;
  1142. }
  1143. .new_plan{
  1144. float: right;
  1145. }
  1146. .plan_content .el-card__body{
  1147. padding: 10px;
  1148. }
  1149. .file_info{
  1150. display: flex;
  1151. justify-content: space-between;
  1152. width: 80%;
  1153. color: #666;
  1154. }
  1155. .ducha_form .el-input{
  1156. width: 350px;
  1157. }
  1158. .duchazu_form .el-form-item__content{
  1159. padding: 3px 2px;
  1160. }
  1161. .blue{
  1162. color: blue;
  1163. }
  1164. body .el-table th.gutter{display: table-cell!important;}
  1165. .edit_baseInfo .el-checkbox{
  1166. margin-left:30px;
  1167. }
  1168. .duchazu_form .el-checkbox{
  1169. margin-left: 0;
  1170. }
  1171. </style>