auditManageList.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. <template>
  2. <rx-layout>
  3. <div slot="center" style>
  4. <rx-fit>
  5. <div slot="toolheader" border="false" foldbtn="false">
  6. <breadcrumb firstLevel="知识仓库管理" lastLevel="审核管理" />
  7. <div class="mainContent">
  8. <div class="body" :style="{'padding-right': $store.state.appSetting.collapsed ? '0px' : '20px' }">
  9. <div class="content">
  10. <a-form ref="auditFrom" layout="inline" style="display:flex;flex-wrap:wrap;">
  11. <a-form-item
  12. class="form-item-style"
  13. label="知识标题"
  14. name="name">
  15. <a-input class="set-input" v-model="queryParam.titles" placeholder="请输入"/>
  16. </a-form-item>
  17. <a-form-item
  18. class="form-item-style"
  19. label="创建时间"
  20. name="createTime">
  21. <a-range-picker v-model="createTime"
  22. class="set-range-picker"
  23. separator="→"
  24. format="YYYY/MM/DD"
  25. valueFormat="YYYY-MM-DD"
  26. @change="handleClearTimeChange">
  27. </a-range-picker>
  28. </a-form-item>
  29. <a-form-item
  30. class="form-item-style"
  31. label="审核状态"
  32. name="online">
  33. <a-select class="set-input" v-model="queryParam.approvalStatus" placeholder="请选择" allowClear :getPopupContainer="triggerNode => { return triggerNode.parentNode }">
  34. <a-select-option v-for="(item,index) in approvalStatusList" :key="index" :value="item.value">
  35. {{item.label}}
  36. </a-select-option>
  37. </a-select>
  38. </a-form-item>
  39. <a-form-item
  40. class="form-item-style"
  41. label="知识类别"
  42. name="online">
  43. <a-select class="set-input" v-model="queryParam.type" placeholder="请选择" allowClear :getPopupContainer="triggerNode => { return triggerNode.parentNode }">
  44. <a-select-option v-for="(item,index) in knowledgeList" :key="index" :value="item.value">
  45. {{item.label}}
  46. </a-select-option>
  47. </a-select>
  48. </a-form-item>
  49. <a-form-item
  50. class="form-item-style"
  51. label="所属分类"
  52. name="categoryIds">
  53. <a-cascader v-model="categoryIds"
  54. class="set-input scroll-ckunk"
  55. :popupStyle="{
  56. maxWidth: widthVar + 'px',
  57. 'overflow-x': 'auto'
  58. }"
  59. :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
  60. :options="classifyList"
  61. :fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
  62. placeholder="请选择"
  63. changeOnSelect
  64. @change="handleClassifyChange" />
  65. </a-form-item>
  66. <a-form-item
  67. class="form-item-style"
  68. label="作者"
  69. name="creator">
  70. <a-input class="set-input" v-model="queryParam.author" placeholder="请输入" />
  71. </a-form-item>
  72. <div style="display:flex;justify-content:center;margin-top: 8px;">
  73. <a-button @click="handleResetClick(true)">重置</a-button>
  74. <a-button type="primary" @click="handleSearchClick">查询</a-button>
  75. </div>
  76. </a-form>
  77. <rx-button alias="processEdit" :butn-icon="'false'" @click="$router.push('/knowledge/auditProcessMaintain')">维护审核流程</rx-button>
  78. <rx-button alias="processBatch" :butn-icon="'false'" @click="handldAuditClick('batch')">批量审核</rx-button>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <rx-grid
  84. ref="auditRef"
  85. class="table-style"
  86. style="background: #fff"
  87. :columns="columns"
  88. :allowRowSelect="true"
  89. :multiSelect="true"
  90. :url="urls"
  91. :queryParam="queryParam"
  92. data-field="result.data"
  93. :defaultPageSize="10"
  94. :heightAuto="true"
  95. :pageSizeOptions="['10','20','30','40']"
  96. idField="pkId"
  97. >
  98. <template slot="pkId" slot-scope="{text,record}">
  99. <div>{{ $route.query.showUnchecked ? record.approvalsFirst.pkId : text }}</div>
  100. </template>
  101. <template slot="titles" slot-scope="{text}">
  102. <div style="white-space: pre-line">{{ text }}</div>
  103. </template>
  104. <template slot="type" slot-scope="{text}">
  105. <div>{{ text == 1 ? '文档知识' : '维基知识' }}</div>
  106. </template>
  107. <template slot="knowledgeCategoryAdminVo" slot-scope="{text}">
  108. <div style="white-space: pre-line">{{ getCategory(text) }}</div>
  109. </template>
  110. <template slot="approvalStatus" slot-scope="{text}">
  111. <div>{{ getApprovalStatus(text) }}</div>
  112. </template>
  113. <template slot="action" slot-scope="{text,record}">
  114. <!-- isAudit 0能审核 1不能审核 -->
  115. <template v-if="($route.query.showUnchecked ? true : record.isAudit == 0) && (record.approvalStatus == 1 || record.approvalStatus == 3)" >
  116. <!-- <template v-if="(record.approvalStatus == 1 || record.approvalStatus == 3) && record.approverId == $store.state.appSetting.user.userId" > -->
  117. <rx-button class="clearBtn" alias="processDo" :butn-icon="'none'" @click="handleJumpUpdateClick(record)">审核</rx-button>
  118. <rx-button class="clearBtn" alias="processFast" :butn-icon="'none'" @click="handldAuditClick('fast',record)">快速审核</rx-button>
  119. </template>
  120. <template v-else>
  121. <rx-button class="clearBtn" alias="processLook" :butn-icon="'none'" @click="handleJumpUpdateClick(record,true)">查看</rx-button>
  122. </template>
  123. </template>
  124. </rx-grid>
  125. </rx-fit>
  126. <a-modal v-model="auditShow"
  127. :title="modalTitle"
  128. centered
  129. okText="保存"
  130. @ok="handleOk"
  131. :confirmLoading="saveLoading">
  132. <a-form ref="labelRef" :model="auditForm" layout="inline">
  133. <a-form-item prop="result">
  134. <a-radio-group v-model="auditForm.result">
  135. <a-radio value="1">通过</a-radio>
  136. <a-radio value="0">驳回</a-radio>
  137. </a-radio-group>
  138. </a-form-item>
  139. <a-form-item prop="remark" style="margin-top:10px;">
  140. <a-input v-model="auditForm.remark" type="textarea" :autosize="{minRows: 3, maxRows: 6}" :maxLength="200" placeholder="请输入审批意见" />
  141. </a-form-item>
  142. <a-form-item v-if="isShowOrg && isDocument" label="权限:" prop="actualApproverName" style="margin-top:10px;">
  143. <div @click="showAuditFlag = true">
  144. <a-select v-model="authName" :showArrow="false" :open="false" placeholder="请选择组织部门、职系、职称等授予知识访问权限"></a-select>
  145. </div>
  146. </a-form-item>
  147. </a-form>
  148. </a-modal>
  149. <a-modal v-model="showAuditFlag"
  150. width="800"
  151. title="选择组织架构"
  152. centered
  153. okText="保存"
  154. @ok="handleSaveOk">
  155. <org-people style="width:800px;height:65vh;"
  156. :isOnlyOrg="false"
  157. :organizationIdsInfo="organizationIdsInfo"
  158. @transCheckedTargets="transCheckedTargets"
  159. @returnSequencesInfo="handleSequencesChange"
  160. @returnGradeInfo="handleGradeChange" ></org-people>
  161. </a-modal>
  162. </div>
  163. </rx-layout>
  164. </template>
  165. <script>
  166. import breadcrumb from '../components/breadcrumb'
  167. import orgPeople from './components/orgPeople'
  168. import api from '@/api/knowledge/audit'
  169. import classApi from '@/api/knowledge/classify'
  170. import { getCategory } from '../aJs/getClassifyTree'
  171. import mixin from "../aMixin/mixin"
  172. import initMixin from "../aMixin/initMixin"
  173. const auditMixin = new mixin('audit')
  174. export default {
  175. name: 'auditManageList',
  176. components: {
  177. breadcrumb,
  178. orgPeople
  179. },
  180. mixins: [ initMixin, auditMixin ],
  181. data() {
  182. return {
  183. api,
  184. classApi,
  185. saveLoading: false,
  186. urls: '',
  187. modalTitle: '快速审核',
  188. extend: true,
  189. queryParam: {
  190. titles: '',
  191. beginTime: '',
  192. endTime: '',
  193. approvalStatus: undefined,
  194. type: undefined,
  195. categoryId: '',
  196. author: '',
  197. },
  198. createTime: [],
  199. categoryIds: [],
  200. knowledgeList: [
  201. {value: null, label: '全部'},
  202. {value: '1', label: '文档知识'},
  203. {value: '2', label: '维基知识'}
  204. ],
  205. approvalStatusList: [
  206. {value: '1', label: '待节点审核'},
  207. {value: '2', label: '节点驳回'},
  208. {value: '3', label: '待最终审核'},
  209. {value: '4', label: '最终驳回'},
  210. {value: '5', label: '最终通过'},
  211. ],
  212. columns: [
  213. {
  214. title: 'ID',
  215. dataIndex: 'pkId',
  216. align: 'center',
  217. scopedSlots: {customRender: 'pkId'}
  218. },
  219. {
  220. title: '知识标题',
  221. dataIndex: 'titles',
  222. align: 'center',
  223. scopedSlots: {customRender: 'titles'}
  224. },
  225. {
  226. title: '知识类型',
  227. dataIndex: 'type',
  228. align: 'center',
  229. width: 100,
  230. scopedSlots: {customRender: 'type'}
  231. },
  232. {
  233. title: '所属分类',
  234. dataIndex: 'knowledgeCategoryAdminVo',
  235. align: 'center',
  236. width: 150,
  237. scopedSlots: {customRender: 'knowledgeCategoryAdminVo'}
  238. },
  239. {
  240. title: '作者',
  241. dataIndex: 'author',
  242. align: 'center',
  243. width: 100
  244. },
  245. {
  246. title: '创建时间',
  247. dataIndex: 'createTime',
  248. align: 'center',
  249. },
  250. {
  251. title: '状态',
  252. dataIndex: 'approvalStatus',
  253. align: 'center',
  254. scopedSlots: {customRender: 'approvalStatus'},
  255. width: 100
  256. },
  257. {
  258. title: '审核人',
  259. dataIndex: 'approverName',
  260. align: 'center',
  261. width: 100
  262. },
  263. {
  264. title: '最后一次审核时间',
  265. dataIndex: 'approvalTime',
  266. align: 'center',
  267. },
  268. {
  269. title: '操作',
  270. dataIndex: 'action',
  271. // align: 'center',
  272. scopedSlots: {customRender: 'action'},
  273. width: 140
  274. }
  275. ],
  276. options: [
  277. {
  278. value: 'zhejiang',
  279. label: 'Zhejiang',
  280. children: [
  281. {
  282. value: 'hangzhou',
  283. label: 'Hangzhou',
  284. },
  285. ],
  286. },
  287. {
  288. value: 'jiangsu',
  289. label: 'Jiangsu',
  290. children: [
  291. {
  292. value: 'nanjing',
  293. label: 'Nanjing',
  294. },
  295. ],
  296. }
  297. ],
  298. auditShow: false,
  299. showAuditFlag: false,
  300. // 要审核的数据
  301. willAuditData: [],
  302. auditForm: {
  303. pkId: '',
  304. result:'1',
  305. remark:'',
  306. actualApprover: '',
  307. actualApproverName: '',
  308. organizationIds: {}
  309. },
  310. authName: undefined,
  311. isShowOrg: false,
  312. classifyList: [],
  313. // 组织架构
  314. checkedTargets: {},
  315. // 职系
  316. sequencesInfo: {},
  317. // 职等
  318. gradesInfo: {},
  319. // 维基知识不能选择权限
  320. isDocument: false,
  321. widthVar: 800,
  322. organizationIdsInfo: {}
  323. }
  324. },
  325. activated() {
  326. if(localStorage.getItem('auditFirst')=='true'){
  327. this.queryParam.categoryId = 9999
  328. localStorage.setItem('auditFirst',false)
  329. }
  330. if(localStorage.getItem('cancle')=='true'){
  331. localStorage.setItem('cancle',false)
  332. }else{
  333. this.reloadTable()
  334. }
  335. setTimeout(() => {
  336. this.queryParam.categoryId = ''
  337. },1000)
  338. },
  339. created() {
  340. // 从知识管理页跳转
  341. if(this.$route.query.showUnchecked) {
  342. this.urls = api.findAllAuditKnowledge
  343. this.approvalStatusList = [
  344. {value: '1', label: '待节点审核'},
  345. {value: '3', label: '待最终审核'}
  346. ]
  347. } else {
  348. this.urls = api.findAllKnowledgeApprove
  349. this.approvalStatusList = [
  350. {value: '1', label: '待节点审核'},
  351. {value: '2', label: '节点驳回'},
  352. {value: '3', label: '待最终审核'},
  353. {value: '4', label: '最终驳回'},
  354. {value: '5', label: '最终通过'},
  355. ]
  356. }
  357. this.init()
  358. },
  359. mounted() {
  360. let innerWidth = window.innerWidth
  361. // 计算
  362. setTimeout(() => {
  363. let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
  364. this.widthVar = innerWidth - offsetWidth - 40
  365. }, 1000);
  366. document.onclick=function(element){
  367. if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
  368. document.querySelector('.ant-cascader-menus').scrollLeft = 20480
  369. }
  370. }
  371. // setInterval(() => {
  372. // document.querySelectorAll('.ant-cascader-menu-item').forEach(el => {
  373. // el.onclick = function() {
  374. // document.querySelector('.ant-cascader-menus').scrollLeft = 2048
  375. // }
  376. // })
  377. // }, 1000)
  378. },
  379. computed: {
  380. getApprovalStatus(){
  381. return function(arg) {
  382. switch(arg) {
  383. case 1:
  384. return '待节点审核'
  385. case 2:
  386. return '节点驳回'
  387. case 3:
  388. return '待最终审核'
  389. case 4:
  390. return '最终驳回'
  391. case 5:
  392. return '最终通过'
  393. }
  394. }
  395. }
  396. },
  397. methods: {
  398. getCategory,
  399. handleSearchClick() {
  400. if(this.createTime && this.createTime.length) {
  401. this.queryParam.beginTime = this.createTime[0]
  402. this.queryParam.endTime = this.createTime[1]
  403. }
  404. if(this.categoryIds && this.categoryIds.length) {
  405. this.queryParam.categoryId = this.categoryIds.slice('-1')[0]
  406. }
  407. this.reloadTable()
  408. },
  409. // 审核
  410. handleJumpUpdateClick(record,arg) {
  411. // 从知识管理跳转
  412. let query = {}
  413. if(this.$route.query.showUnchecked) {
  414. if(arg) {
  415. // 查看
  416. query = {
  417. pkId: record.pkId,
  418. type: 'auditManageList',
  419. auditId: record.approvalsFirst.pkId,
  420. show: true,
  421. isLook: true
  422. }
  423. } else {
  424. // 审核
  425. query = {
  426. pkId: record.pkId,
  427. type: 'auditManageList',
  428. auditId: record.approvalsFirst.pkId,
  429. show: true,
  430. isAudit: true
  431. }
  432. }
  433. } else {
  434. // 当前审核管理跳转
  435. if(arg) {
  436. // 查看
  437. query = {
  438. pkId: record.knowledgerId,
  439. type: 'auditManageList',
  440. auditId: record.pkId,
  441. show: true,
  442. isLook: true
  443. }
  444. } else {
  445. // 审核
  446. query = {
  447. pkId: record.knowledgerId,
  448. type: 'auditManageList',
  449. auditId: record.pkId,
  450. show: true,
  451. isAudit: true
  452. }
  453. }
  454. }
  455. this.$router.push({
  456. path: '/knowledge/knowledgeAddUpdate',
  457. query
  458. })
  459. },
  460. // 确认审核
  461. handleOk(){
  462. this.saveLoading = true
  463. let ids = this.willAuditData.map(item => item.pkId)
  464. if(this.$route.query.showUnchecked) {
  465. ids = this.willAuditData.map(item => item.approvalsFirst.pkId)
  466. }
  467. this.auditForm.actualApprover = this.$store.state.appSetting.user.userId
  468. this.auditForm.actualApproverName = this.$store.state.appSetting.user.fullName
  469. // 快速审核
  470. if(ids.length == 1) {
  471. this.auditForm.pkId = ids[0]
  472. api.knowledgeApproveById(this.auditForm).then(res => {
  473. if(res.code == 200) {
  474. this.auditShow = false
  475. this.reloadTable()
  476. this.saveLoading = false
  477. }
  478. })
  479. } else {
  480. // 批量审核
  481. this.auditForm.pkIds = ids
  482. api.knowledgeApproveBatchById(this.auditForm).then(res => {
  483. if(res.code == 200) {
  484. this.auditShow = false
  485. this.reloadTable()
  486. this.saveLoading = false
  487. }
  488. })
  489. }
  490. },
  491. // 快速审核/批量审核
  492. handldAuditClick(title,arg = {}) {
  493. this.modalTitle = title == 'fast' ? '快速审核' : '批量审核'
  494. this.auditForm = Object.assign({},this.$options.data().auditForm)
  495. this.authName = undefined
  496. this.willAuditData = []
  497. if(title == 'fast') {
  498. this.isDocument = arg.type == 1 ? true : false
  499. this.isShowOrg = arg.approvalStatus == 3 ? true : false
  500. this.auditForm.organizationIds = arg.organizationIds
  501. this.organizationIdsInfo = arg.organizationIds
  502. if(arg.organizationIds) {
  503. let organizationInfo = arg.organizationIds
  504. let info = []
  505. // for(let i of organizationInfo) {
  506. // if(i.organizationIds) {
  507. // info.push(`${i.organizationTree.join('-')}`)
  508. // } else if(i.gradeId) {
  509. // info.push(`职系-${i.gradeName}`)
  510. // } else {
  511. // info.push(`职等-${i.gradeLevelName}`)
  512. // }
  513. // }
  514. if(organizationInfo.organizationId) {
  515. info.push(`组织:[${organizationInfo.organizationTree}]`)
  516. }
  517. if(organizationInfo.gradeId) {
  518. info.push(`职系:[${organizationInfo.gradeName}]`)
  519. }
  520. if(organizationInfo.gradeLevelId) {
  521. info.push(`职等:[${organizationInfo.gradeLevelName}]`)
  522. }
  523. this.checkedTargets.organizationId = organizationInfo.organizationId
  524. this.checkedTargets.organizationName = organizationInfo.organizationName
  525. this.checkedTargets.organizationTree = organizationInfo.organizationTree
  526. this.sequencesInfo.gradeId = organizationInfo.gradeId
  527. this.sequencesInfo.gradeName = organizationInfo.gradeName
  528. this.gradesInfo.gradeLevelId = organizationInfo.gradeLevelId
  529. this.gradesInfo.gradeLevelName = organizationInfo.gradeLevelName
  530. this.authName = info.join('/')
  531. }
  532. this.willAuditData.push(arg)
  533. } else {
  534. this.willAuditData = this.$refs.auditRef.getSelectedRows()
  535. for(let i of this.willAuditData) {
  536. if(i.approvalStatus != 1 && i.approvalStatus != 3) {
  537. this.$message.error("审核存在状态为驳回/通过的节点,无法审批");
  538. return
  539. }
  540. // if(i.approvalStatus == 3) {
  541. // this.isShowOrg = true
  542. // this.isDocument = i.type == 1 ? true : false
  543. // break
  544. // } else {
  545. // this.isShowOrg = false
  546. // }
  547. }
  548. let approvalStatusData = this.willAuditData.filter(item => item.approvalStatus == 3)
  549. if(approvalStatusData.length == 1) {
  550. let approvalStatusInfo = approvalStatusData[0]
  551. this.isShowOrg = true
  552. this.isDocument = approvalStatusInfo.type == 1 ? true : false
  553. this.auditForm.organizationIds = approvalStatusInfo.organizationIds
  554. this.organizationIdsInfo = approvalStatusInfo.organizationIds
  555. if(approvalStatusInfo.organizationIds) {
  556. let organizationInfo = approvalStatusInfo.organizationIds
  557. let info = []
  558. if(organizationInfo.organizationId) {
  559. info.push(`组织:[${organizationInfo.organizationTree}]`)
  560. }
  561. if(organizationInfo.gradeId) {
  562. info.push(`职系:[${organizationInfo.gradeName}]`)
  563. }
  564. if(organizationInfo.gradeLevelId) {
  565. info.push(`职等:[${organizationInfo.gradeLevelName}]`)
  566. }
  567. this.checkedTargets.organizationId = organizationInfo.organizationId
  568. this.checkedTargets.organizationName = organizationInfo.organizationName
  569. this.checkedTargets.organizationTree = organizationInfo.organizationTree
  570. this.sequencesInfo.gradeId = organizationInfo.gradeId
  571. this.sequencesInfo.gradeName = organizationInfo.gradeName
  572. this.gradesInfo.gradeLevelId = organizationInfo.gradeLevelId
  573. this.gradesInfo.gradeLevelName = organizationInfo.gradeLevelName
  574. // for(let i of organizationInfo) {
  575. // if(i.organizationIds) {
  576. // info.push(`${i.organizationTree.join('-')}`)
  577. // } else if(i.gradeId) {
  578. // info.push(`职系-${i.gradeName}`)
  579. // } else {
  580. // info.push(`职等-${i.gradeLevelName}`)
  581. // }
  582. // }
  583. this.authName = info.join('/')
  584. }
  585. } else {
  586. this.isShowOrg = false
  587. }
  588. }
  589. if(!this.willAuditData.length) return
  590. this.auditShow = true
  591. this.$nextTick(() => document.getElementsByClassName('ant-form-item-control-wrapper')[8].style.width = '70%')
  592. },
  593. transCheckedTargets(arg) {
  594. this.checkedTargets = arg
  595. },
  596. handleSequencesChange(arg) {
  597. this.sequencesInfo = arg
  598. },
  599. handleGradeChange(arg) {
  600. this.gradesInfo = arg
  601. },
  602. handleSaveOk() {
  603. if(this.isShowOrg) {
  604. // let info = []
  605. // let res = []
  606. // if(this.checkedTarget.organizationId) {
  607. // info.push(`${this.checkedTarget.organizationTree.join('-')}`)
  608. // res.push(this.checkedTarget)
  609. // }
  610. // if(this.sequencesInfo.gradeId) {
  611. // info.push(`职系-${this.sequencesInfo.gradeName}`)
  612. // res.push(this.sequencesInfo)
  613. // }
  614. // if(this.gradesInfo.gradeLevelId) {
  615. // info.push(`职等-${this.gradesInfo.gradeLevelName}`)
  616. // res.push(this.gradesInfo)
  617. // }
  618. // if(info.length) {
  619. // this.authName = info.join('/')
  620. // }
  621. // if(res.length) {
  622. // this.auditForm.organizationIds = res
  623. // } else {
  624. // this.auditForm.organizationIds = ""
  625. // }
  626. let info = []
  627. let res = {}
  628. console.log(this.checkedTargets)
  629. if(this.checkedTargets && this.checkedTargets.organizationId) {
  630. info.push(`组织:[${this.checkedTargets.organizationTree}]`)
  631. res['organizationId'] = this.checkedTargets.organizationId
  632. res['organizationName'] = this.checkedTargets.organizationName
  633. res['organizationTree'] = this.checkedTargets.organizationTree
  634. }
  635. if(this.sequencesInfo && this.sequencesInfo.gradeId) {
  636. info.push(`职系:[${this.sequencesInfo.gradeName}]`)
  637. res['gradeId'] = this.sequencesInfo.gradeId
  638. res['gradeName'] = this.sequencesInfo.gradeName
  639. }
  640. if(this.gradesInfo && this.gradesInfo.gradeLevelId) {
  641. info.push(`职等:[${this.gradesInfo.gradeLevelName}]`)
  642. res['gradeLevelId'] = this.gradesInfo.gradeLevelId
  643. res['gradeLevelName'] = this.gradesInfo.gradeLevelName
  644. }
  645. if(info.length) {
  646. this.authName = info.join('/')
  647. }
  648. if(Object.keys(res).length) {
  649. this.auditForm.organizationIds = res
  650. } else {
  651. this.auditForm.organizationIds = {}
  652. }
  653. }
  654. this.showAuditFlag = false
  655. },
  656. // 重新加载表格
  657. reloadTable() {
  658. this.$refs.auditRef.loadData()
  659. }
  660. }
  661. }
  662. </script>
  663. <style lang="less" scoped>
  664. @gary: #f8f8f8;
  665. @white: #fff;
  666. .rx-fit {
  667. padding: 40px!important;
  668. background: @gary;
  669. overflow-y: auto!important;
  670. display: block!important;
  671. .fit-header {
  672. .mainContent {
  673. width: 100%;
  674. .body {
  675. background: @white;
  676. padding: 10px 0 10px 20px;
  677. .content {
  678. background: @white;
  679. button:first-child {
  680. margin-right: 20px;
  681. }
  682. >button {
  683. margin: 10px;
  684. margin-left: 0;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. .table-style {
  691. padding: 20px;
  692. min-height: 400px;
  693. .clearBtn {
  694. background: none;
  695. color: #3294F7;
  696. text-shadow: none;
  697. padding: 0px 6px;
  698. border: none;
  699. box-shadow: none;
  700. }
  701. }
  702. }
  703. .knowledge-manage {
  704. position: relative;
  705. }
  706. .knowledge-manage::after {
  707. position: absolute;
  708. top: -11px;
  709. left: 76px;
  710. content: attr(data-attr);
  711. width: 20px;
  712. height: 20px;
  713. background: red;
  714. border-radius: 50%;
  715. }
  716. .show-other{
  717. width: 100%;
  718. animation:show-other-search 0.8s;
  719. }
  720. .form-item-style {
  721. margin: 5px 20px 5px 0;
  722. }
  723. .set-input {
  724. width:180px;
  725. }
  726. .set-select {
  727. width:120px;
  728. }
  729. .set-range-picker {
  730. width:230px!important;
  731. }
  732. @keyframes show-other-search{
  733. 0%{opacity:0;}
  734. 50%{opacity:0.8;}
  735. 100%{opacity: 1;}
  736. }
  737. </style>
  738. <style scoped>
  739. /deep/ .divdefault {
  740. position: inherit!important;
  741. }
  742. /deep/ .ant-btn > .anticon + span {
  743. margin-left: 0;
  744. }
  745. /deep/.ant-table-thead > tr > th {
  746. text-align: center;
  747. height: 54px;
  748. }
  749. /deep/ .ant-table-tbody > tr > td {
  750. height: 54px;
  751. }
  752. /deep/ .ant-form{
  753. padding: 0;
  754. }
  755. /deep/ .gridContent{
  756. border: none;
  757. }
  758. /deep/ .ant-cascader-menus {
  759. left: 0!important;
  760. }
  761. /deep/ .ant-cascader-menu:last-child {
  762. margin-right: 0;
  763. }
  764. </style>