systemOperation.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. <!-- 体系操作页面 -->
  2. <template>
  3. <TableView class="product"
  4. @body-height-change="bodyHeightChange">
  5. <template slot="body">
  6. <div class="cont-main system-operation">
  7. <!-- <el-radio-group v-model="reportTabs" size="small" @change="changeStatus">-->
  8. <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationPending'" label="pendingTodo">{{ $t('system.fileManagement.reportTabs.pendingTodo') }}</el-radio-button>-->
  9. <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationTracking'" label="following">{{ $t('system.fileManagement.reportTabs.following') }}</el-radio-button>-->
  10. <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationAll'" label="all">{{ $t('system.fileManagement.reportTabs.all') }}</el-radio-button>-->
  11. <!-- &lt;!&ndash; <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationMyReport'" label="myReports">{{ $t('system.fileManagement.reportTabs.myReports') }}</el-radio-button>&ndash;&gt;-->
  12. <!-- </el-radio-group>-->
  13. <div class="selectBtn mb10">
  14. <!-- 筛选输入框 -->
  15. <!-- 过滤 -->
  16. <div class="searchTwo">
  17. <ws-button type="text"
  18. @click="dialogFormVisible = true"
  19. class="guolv">
  20. <i class="iconfont iconfilter" />
  21. <!-- <svg-icon icon-class="guolv" /> -->
  22. <span>{{ $t('zs.common.sizer') }}</span>
  23. </ws-button>
  24. </div>
  25. <!-- 共0条结果 -->
  26. <span class="filter-total">{{ $t('zs.common.thereAre') }}{{ tableData.total
  27. }}{{ $t('cg.queryresults') }}</span>
  28. <!-- <ws-input v-model.trim="page.searchKeyword"
  29. class="selectInput"
  30. :placeholder="$t('system.fileManagement.tips.operationTips')"
  31. @clear="resetSearch"
  32. @keyup.enter.native="handleFilter('title')" />
  33. //<svg-icon icon-class="searchIcon"
  34. class="searchIcon"
  35. @click="handleFilter('title')" /> -->
  36. <BaseInputSearch v-model="page.searchKeyword"
  37. :placeholder="$t('system.fileManagement.tips.operationTips')"
  38. @search="handleFilter('title')" />
  39. </div>
  40. <ws-status-radio @changeStatus="changeStatus"
  41. class="fr mt10"></ws-status-radio>
  42. <!-- <ws-radio-group-->
  43. <!-- v-model="reportTabs"-->
  44. <!-- class="status-list fr"-->
  45. <!-- style="line-height: 43px"-->
  46. <!-- @change="changeStatus"-->
  47. <!-- >-->
  48. <!-- <el-radio label="1">{{ $t('common.processed') }}</el-radio>-->
  49. <!-- <el-radio label="2">{{ $t('common.track') }}</el-radio>-->
  50. <!-- <el-radio label="all">{{ $t('common.all') }}</el-radio>-->
  51. <!-- </ws-radio-group>-->
  52. <div>
  53. <ws-normal-table :data="tableData.records"
  54. @cell-mouse-enter="msgRow"
  55. highlight-current-row
  56. :row-class-name="tableRowClassName"
  57. style="width: 100%"
  58. :height="tableViewBodyHeight - 50">
  59. <ws-table-column prop="operateFlag"
  60. min-width="50">
  61. <template slot-scope="scope">
  62. <span class="el-dropdown-link"
  63. v-if="
  64. scope.row.operateFlag * 1 === 2 ||
  65. scope.row.operateFlag * 1 === 3
  66. ">
  67. <img src="@/assets/update.png"
  68. alt />
  69. </span>
  70. </template>
  71. </ws-table-column>
  72. <ws-table-column type="index"
  73. width="50"
  74. align="center"
  75. :label="$t('common.num')">
  76. <template slot-scope="scope">{{
  77. scope.$index + 1 + (page.currentPage - 1) * page.pageSize
  78. }}</template>
  79. </ws-table-column>
  80. <ws-table-column prop="vesselDepartmentName"
  81. min-width="150"
  82. :label="$t('system.fileManagement.reportTable.ShipDepartment')"></ws-table-column>
  83. <ws-table-column prop="fileName"
  84. min-width="200"
  85. show-overflow-tooltip
  86. :label="$t('system.fileManagement.reportTable.fileName')">
  87. <template slot-scope="scope">
  88. <div style="display: flex;align-items: center">
  89. <span>
  90. <i class="iconfont iconpdfy"
  91. v-if="scope.row.fileType === 'pdf'"
  92. style="font-size: 20px;color: #FF4867" />
  93. <!-- <img-->
  94. <!-- v-if="scope.row.fileType === 'pdf'"-->
  95. <!-- src="@/assets/pdf.png"-->
  96. <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
  97. <!-- />-->
  98. <i class="iconfont iconword"
  99. v-if="
  100. scope.row.fileType === 'doc' ||
  101. scope.row.fileType === 'docx'
  102. "
  103. style="font-size: 20px;color: #4A8DFF" />
  104. <!-- <img-->
  105. <!-- v-if="-->
  106. <!-- scope.row.fileType === 'doc' ||-->
  107. <!-- scope.row.fileType === 'docx'-->
  108. <!-- "-->
  109. <!-- src="@/assets/word.png"-->
  110. <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
  111. <!-- />-->
  112. <i class="iconfont iconexcely"
  113. v-if="
  114. scope.row.fileType === 'xls' ||
  115. scope.row.fileType === 'xlsx'
  116. "
  117. style="font-size: 20px;color: #00C090" />
  118. <!-- <img-->
  119. <!-- v-if="-->
  120. <!-- scope.row.fileType === 'xls' ||-->
  121. <!-- scope.row.fileType === 'xlsx'-->
  122. <!-- "-->
  123. <!-- src="@/assets/excel.png"-->
  124. <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
  125. <!-- />-->
  126. </span>
  127. <a class="clickabled"
  128. v-if="
  129. scope.row.statusFlag === '1001' ||
  130. scope.row.statusFlag === '1003'
  131. "
  132. :href="url + scope.row.filePathId + '&showSaveFlag=1'"
  133. target="_blank">{{ scope.row.fileName }}</a>
  134. <a class="clickabled"
  135. v-else-if="scope.row.statusFlag === '1010'"
  136. :href="
  137. url +
  138. scope.row.filePathId +
  139. '&showSaveFlag=' +
  140. scope.row.reviewerEdit
  141. "
  142. target="_blank">{{ scope.row.fileName }}</a>
  143. <a class="clickabled"
  144. v-else-if="scope.row.statusFlag === '1005'"
  145. :href="url + scope.row.filePathId"
  146. target="_blank">{{ scope.row.fileName }}</a>
  147. <a class="clickabled"
  148. v-else
  149. :href="url + scope.row.filePathId"
  150. target="_blank">{{ scope.row.fileName }}</a>
  151. </div>
  152. </template>
  153. </ws-table-column>
  154. <!-- <ws-table-column prop="version" min-width="150" :label="$t('system.fileManagement.reportTable.versionNum')"></ws-table-column>-->
  155. <ws-table-column prop="creater"
  156. min-width="150"
  157. :label="$t('system.fileManagement.reportTable.initiator')"></ws-table-column>
  158. <ws-table-column prop="fileReportTypeName"
  159. min-width="150"
  160. :label="$t('system.fileManagement.setting.fileType')">
  161. <template slot-scope="scope">{{
  162. scope.row.fileReportTypeName == '操作文档' ? '是' : '否'
  163. }}</template>
  164. </ws-table-column>
  165. <ws-table-column prop="uploadDate"
  166. min-width="150"
  167. :label="$t('system.fileManagement.reportTable.createTime')"></ws-table-column>
  168. <ws-table-column prop="lastReportDate"
  169. min-width="150"
  170. :label="$t('system.fileManagement.reportTable.lastFilledInTime')"></ws-table-column>
  171. <ws-table-column prop="status"
  172. min-width="150"
  173. :label="$t('system.fileManagement.reportTable.status')"></ws-table-column>
  174. <ws-table-column prop="operationHisResponseList"
  175. min-width="150"
  176. :label="$t('system.fileManagement.reportTable.historyRecord')">
  177. <template slot-scope="scope">
  178. <ws-dropdown placement="bottom-start">
  179. <span class="el-dropdown-link">
  180. <i class="iconfont iconchangehistoryy" />
  181. <!-- <img src="@/assets/changeHistory.png" alt />-->
  182. </span>
  183. <ws-dropdown-menu slot="dropdown">
  184. <ws-dropdown-item>
  185. <ws-normal-table :data="scope.row.operationHisResponseList"
  186. highlight-current-row>
  187. <ws-table-column prop="operateUserName"
  188. width="150"
  189. :label="
  190. $t(
  191. 'system.fileManagement.reportTable.operatePerson'
  192. )
  193. "></ws-table-column>
  194. <ws-table-column prop="operateDate"
  195. width="150"
  196. :label="
  197. $t('system.fileManagement.reportTable.operateDate')
  198. ">
  199. <template slot-scope="scope">{{
  200. scope.row.operateDate
  201. }}</template>
  202. </ws-table-column>
  203. <ws-table-column prop="operateHis"
  204. width="150"
  205. :label="
  206. $t(
  207. 'system.fileManagement.reportTable.operateHistory'
  208. )
  209. "></ws-table-column>
  210. <ws-table-column prop="dealMsg"
  211. width="150"
  212. :label="
  213. $t(
  214. 'system.fileManagement.reportTable.reviewReturnComments'
  215. )
  216. "></ws-table-column>
  217. </ws-normal-table>
  218. </ws-dropdown-item>
  219. </ws-dropdown-menu>
  220. </ws-dropdown>
  221. </template>
  222. </ws-table-column>
  223. <ws-table-column prop="certificateName"
  224. min-width="150"
  225. :label="$t('system.fileManagement.reportTable.attachment')">
  226. <template slot-scope="scope">
  227. <span @click="getAttach(scope)">
  228. <i class="iconfont iconfujiany" />
  229. <!-- <img src="@/assets/fujian.png" alt />-->
  230. {{ scope.row.appendixSize }}
  231. </span>
  232. </template>
  233. </ws-table-column>
  234. <ws-table-column v-if="reportTabs === '1'"
  235. prop="statusFlag"
  236. :label="$t('common.operate')"
  237. align="center"
  238. width="80">
  239. <template slot-scope="scope">
  240. <yh-operaction :lable="lable"
  241. :status-flag="scope.row.statusFlag"
  242. @skip="skipPage" />
  243. </template>
  244. </ws-table-column>
  245. </ws-normal-table>
  246. </div>
  247. </div>
  248. </template>
  249. <template slot="footer">
  250. <pagination v-if="tableData.total > 0"
  251. :total="tableData.total"
  252. :page.sync="page.currentPage"
  253. :limit.sync="page.pageSize"
  254. @pagination="getFollowList" />
  255. </template>
  256. <!-- <ws-common-loading v-if="loading"></ws-common-loading> -->
  257. <!-- 过滤dialog -->
  258. <div class="myDialogDiv">
  259. <ws-dialog :title="$t('button.filtration')"
  260. :visible.sync="dialogFormVisible"
  261. width="350px"
  262. :modal="false"
  263. class="dialogListquery"
  264. style="margin-left: 56%"
  265. :close-on-click-modal="false">
  266. <ws-form ref="spclearsplistqueryForm"
  267. :model="page"
  268. label-width="105px"
  269. label-position="left">
  270. <!-- 适用船舶 -->
  271. <ws-form-item :label="$t('system.fileManagement.applicableShip')"
  272. v-if="vesselBankFlag === 'B'">
  273. <ws-select filterable clearable
  274. v-model="page.vesselId"
  275. style="width:100%"
  276. :placeholder="$t('common.selected')">
  277. <ws-option :label="$t('common.selected')"
  278. value=""></ws-option>
  279. <ws-option v-for="item in shipOptions"
  280. :key="item.vesselId"
  281. :label="item.vesselName"
  282. :value="item.vesselId"></ws-option>
  283. </ws-select>
  284. </ws-form-item>
  285. <!-- 适用部门 -->
  286. <ws-form-item :label="$t('system.fileManagement.applicableDepartments')"
  287. v-if="vesselBankFlag === 'B'">
  288. <ws-select v-model="page.deptId"
  289. style="width:100%"
  290. :placeholder="$t('common.selected')">
  291. <ws-option :label="$t('common.selected')"
  292. value=""></ws-option>
  293. <ws-option v-for="item in deptOptions"
  294. :key="item.deptId"
  295. :label="item.deptName"
  296. :value="item.deptId"></ws-option>
  297. </ws-select>
  298. </ws-form-item>
  299. <!-- 创建时间 -->
  300. <ws-form-item :label="$t('system.fileManagement.reportTable.createDate')">
  301. <ws-date-picker v-model="createDate"
  302. :placeholder="$t('common.selected')"
  303. type="daterange"
  304. value-format="yyyy-MM-dd"></ws-date-picker>
  305. </ws-form-item>
  306. <!-- 任务类型 -->
  307. <ws-form-item :label="$t('system.fileManagement.taskType')">
  308. <ws-select v-model="page.fileTemplateType"
  309. style="width:100%"
  310. :placeholder="$t('common.selected')">
  311. <ws-option :label="$t('common.selected')"
  312. value=""></ws-option>
  313. <ws-option :label="$t('system.fileManagement.updateFile')"
  314. value="1"></ws-option>
  315. <ws-option :label="$t('system.fileManagement.fillFile')"
  316. value="2"></ws-option>
  317. </ws-select>
  318. </ws-form-item>
  319. <!-- 状态 -->
  320. <ws-form-item :label="$t('system.fileManagement.button.status')">
  321. <ws-select v-model="page.statusFlag"
  322. style="width:100%"
  323. :placeholder="$t('common.selected')">
  324. <ws-option :label="$t('common.selected')"
  325. value=""></ws-option>
  326. <ws-option v-for="item in statusOptions"
  327. :key="item.id"
  328. :label="item.valueZh"
  329. :value="item.id"></ws-option>
  330. </ws-select>
  331. </ws-form-item>
  332. </ws-form>
  333. <div slot="footer"
  334. class="dialog-footer">
  335. <ws-button @click="clearfiltQuery">{{
  336. $t('button.reset')
  337. }}</ws-button>
  338. <ws-button type="primary"
  339. @click="handleFilter()">{{
  340. $t('button.filtration')
  341. }}</ws-button>
  342. </div>
  343. </ws-dialog>
  344. </div>
  345. <!-- 查看附件 -->
  346. <WinseaContentModal :title="$t('system.fileManagement.viewAttachment')"
  347. v-model="checkDialogFlag">
  348. <!-- <ws-common-dialog ref="checkDialog"
  349. :title="$t('system.fileManagement.viewAttachment')"
  350. :type="type"
  351. :normalFooter="false">
  352. <div slot="body"> -->
  353. <ws-upload :editable="isUpload"
  354. ref="upload"
  355. table-name="ism_file_operation_info"
  356. oss-key="systemOperation"
  357. :comp-id="compId"
  358. :appendix-ids="appendixIds"
  359. @onChange="uploadSuccess" />
  360. <!-- </div> -->
  361. <div slot="footer">
  362. <ws-button v-if="isUpload"
  363. type="primary"
  364. @click="commitAttach">{{
  365. $t('button.confirm')
  366. }}</ws-button>
  367. <ws-button v-if="isUpload"
  368. @click="cancelCommitAttach">{{
  369. $t('button.cancel')
  370. }}</ws-button>
  371. </div>
  372. <!-- </ws-common-dialog> -->
  373. </WinseaContentModal>
  374. <!--审核流,审核盒子-->
  375. <WinseaContentModal :title="approveTitle"
  376. v-model="auditDialogFlag"
  377. @on-cancel="setBlank"
  378. @on-done="goSubmitReview">
  379. <!-- <ws-common-dialog ref="auditDialog"
  380. :title="approveTitle"
  381. :type="type"
  382. @clickSure="goSubmitReview"
  383. @clickCancel="setBlank">
  384. <div slot="body"> -->
  385. <ws-form ref="handle"
  386. :rules="handles"
  387. label-width="auto"
  388. :model="handle">
  389. <ws-form-item :label="$t('cw.annualBudget.auditOpinion') + $t('common.colon')"
  390. v-if="approveTitle === this.$t('button.approve')">
  391. <ws-input v-model="handle.auditMind"
  392. maxlength="200"
  393. type="textarea"
  394. style="width:80%" />
  395. </ws-form-item>
  396. <ws-form-item :label="$t('common.returnReason') + $t('common.colon')"
  397. prop="auditMind"
  398. v-else-if="approveTitle === this.$t('button.noapprove')">
  399. <ws-input v-model="handle.auditMind"
  400. maxlength="200"
  401. type="textarea"
  402. style="width:80%" />
  403. </ws-form-item>
  404. </ws-form>
  405. <!-- </div>
  406. </ws-common-dialog> -->
  407. </WinseaContentModal>
  408. </TableView>
  409. </template>
  410. <script>
  411. import Pagination from '@/components/Pagination'
  412. import WsUpload from '@/components/WsUpload'
  413. import TableView from '@/layout/TableView'
  414. import TableViewMix from '@/layout/mixin/TableViewMix'
  415. // 体系操作
  416. import {
  417. getFileOperationInfoWaitDealWithByPage,
  418. getFileOperationInfoTrackByPage,
  419. getAllFileOperationInfoByPage,
  420. discard,
  421. toSubmitReview,
  422. receive,
  423. archive,
  424. operationSendShip,
  425. reviewPass,
  426. reviewNotPass,
  427. getAppShips,
  428. getDeptListByCompId,
  429. uploadAttachFile,
  430. getFileOperationStatusList
  431. } from '@/model/system'
  432. import yhOperaction from '@/components/WinseaCom/operaction.vue'
  433. import { handle } from '@/model/workflow'
  434. import WsStatusRadio from '@/components/RadioGroup/index'
  435. import WsShipDropdown from '@/components/ShipDown/index'
  436. import { throttle } from 'lodash'
  437. import { EventBus } from 'base-core-lib'
  438. export default {
  439. name: 'systemOperation',
  440. mixins: [TableViewMix],
  441. components: {
  442. WsStatusRadio,
  443. WsShipDropdown,
  444. Pagination,
  445. WsUpload,
  446. yhOperaction,
  447. TableView
  448. },
  449. data () {
  450. return {
  451. auditDialogFlag: false,
  452. checkDialogFlag: false,
  453. type: 'twoForm',
  454. fileType: '',
  455. fileTemplateTypeId: '',
  456. url: process.env.VUE_APP_BASE_API + '/office/file?fileId=', //config.onlineUrl,
  457. newFilePath: `saas/${sessionStorage.getItem(
  458. 'ws-pf_compId'
  459. )}/system/systemOperation/${this.nowFormatDate('YYYYMMDD')}/appendix/`,
  460. // config.getUploadPath(
  461. // 'systemOperation',
  462. // sessionStorage.getItem('ws-pf_compId')
  463. // ),
  464. vesselBankFlag: '',
  465. shipOptions: [],
  466. statusOptions: [],
  467. deptOptions: [],
  468. payLoading: false,
  469. approveTitle: '', // 审核盒子title
  470. dialogApprove: false, // 审核弹框
  471. handles: {
  472. auditMind: [{ required: true, trigger: 'blur' }]
  473. },
  474. handle: {
  475. taskId: '',
  476. approved: true,
  477. auditMind: '',
  478. needReapply: true
  479. },
  480. lable: [
  481. {
  482. lab: this.$t('button.discard'),
  483. click: 'discard',
  484. hp: true,
  485. code: '1001,1002,1003'
  486. },
  487. {
  488. lab: this.$t('button.submitReview'),
  489. click: 'submitReview',
  490. hp: true,
  491. code: '1001,1002,1003'
  492. },
  493. {
  494. lab: this.$t('button.approve'),
  495. click: 'approve',
  496. hp: true,
  497. code: '1010'
  498. },
  499. {
  500. lab: this.$t('button.noapprove'),
  501. click: 'noapprove',
  502. hp: true,
  503. code: '1010'
  504. },
  505. {
  506. lab: this.$t('button.send'),
  507. click: 'send',
  508. hp: true,
  509. code: '1004'
  510. },
  511. {
  512. lab: this.$t('button.Receive'),
  513. click: 'Receive',
  514. hp: true,
  515. code: '1005'
  516. },
  517. {
  518. lab: this.$t('button.archive'),
  519. click: 'archive',
  520. hp: true,
  521. code: '1007'
  522. }
  523. ],
  524. temId: '',
  525. filePathId: '',
  526. temName: '',
  527. dialogSortVisible: false,
  528. isUpload: false,
  529. compId: sessionStorage.getItem('ws-pf_compId'),
  530. appendixIds: '',
  531. editAppendixIds: '',
  532. attachId: '',
  533. reportTabs: '1',
  534. tableData: {
  535. records: [{}],
  536. total: 0
  537. },
  538. loading: false,
  539. page: {
  540. vesselId: '',
  541. deptId: '',
  542. statusFlag: '',
  543. createStartDate: '',
  544. createEndDate: '',
  545. fileTemplateType: '',
  546. currentPage: 1,
  547. pageSize: 10,
  548. searchKeyword: ''
  549. },
  550. createDate: [],
  551. dialogFormVisible: false,
  552. reportRow: {}
  553. }
  554. },
  555. created () {
  556. this.vesselBankFlag = sessionStorage.getItem('ws-pf_vesselBankFlag')
  557. this.getShips()
  558. this.getFollowList()
  559. this.getDeptListByCompId()
  560. },
  561. methods: {
  562. changeStatus (key) {
  563. this.reportTabs = key
  564. this.page.currentPage = 1
  565. this.getFollowList()
  566. },
  567. // 查看附件
  568. getAttach (scope) {
  569. this.appendixIds =
  570. scope.row.appendixId && scope.row.appendixId.length > 0
  571. ? scope.row.appendixId.split(';').join(',')
  572. : ''
  573. this.attachId = scope.row.id
  574. if (scope.row.statusFlag === '1001' || scope.row.statusFlag === '1003') {
  575. this.isUpload = true
  576. } else {
  577. this.isUpload = false
  578. }
  579. // this.dialogSortVisible = true
  580. this.checkDialogFlag = true
  581. // this.appendixIds = this._.map(scope.row.operationHisResponseList, 'appendixId').join(',')
  582. },
  583. tableRowClassName ({ row, rowIndex }) {
  584. if (row.statusFlag === '1001') {
  585. return 'error-row'
  586. } else {
  587. return ''
  588. }
  589. },
  590. // 船舶列表
  591. getShips () {
  592. getAppShips({ compId: sessionStorage.getItem('ws-pf_compId') }).toPromise().then(data => {
  593. this.shipOptions = data
  594. })
  595. },
  596. // 状态列表
  597. getStatusList () {
  598. // TODO: 先写死3 不确定全部是啥
  599. getFileOperationStatusList({ code: this.reportTabs || 3 }).toPromise().then(data => {
  600. this.statusOptions = data
  601. })
  602. },
  603. // 部门列表
  604. getDeptListByCompId () {
  605. getDeptListByCompId({ compId: sessionStorage.getItem('ws-pf_compId') }).toPromise().then(data => {
  606. this.deptOptions = data
  607. })
  608. },
  609. // 退回按钮
  610. setBlank () {
  611. this.auditDialog = false
  612. this.$refs.handle.resetFields()
  613. },
  614. // 审核通过
  615. goSubmitReview: throttle(
  616. function () {
  617. if (this.reportRow.operateFlag === '2') {
  618. // this.elLoading()
  619. this.loading = true
  620. ; (this.handle.taskId = this.reportRow.taskId),
  621. (this.handle.approved =
  622. this.approveTitle === this.$t('button.approve'))
  623. handle({ baseUrl: process.env.VUE_APP_API_ISM, ...this.handle }).toPromise().then(res => {
  624. if (res.message === 'Success') {
  625. EventBus.$emit('success', this.$t('message.message1'))
  626. this.auditDialog = false
  627. this.getFollowList()
  628. }
  629. })
  630. } else {
  631. // this.elLoading()
  632. this.loading = true
  633. if (this.approveTitle === this.$t('button.approve')) {
  634. this.handle.approved = true
  635. reviewPass(
  636. this.$qs.stringify({
  637. id: this.reportRow.id,
  638. message: this.handle.auditMind
  639. })
  640. ).toPromise().then(res => {
  641. // if (res.message === 'Success') {
  642. this.auditDialog = false
  643. EventBus.$emit('success', this.$t('message.message1'))
  644. this.getFollowList()
  645. // }
  646. })
  647. } else {
  648. this.$refs.handle.validate(valid => {
  649. if (valid) {
  650. this.handle.approved = false
  651. reviewNotPass(
  652. this.$qs.stringify({
  653. id: this.reportRow.id,
  654. message: this.handle.auditMind
  655. })
  656. ).toPromise().then(res => {
  657. // if (res.message === 'Success') {
  658. this.auditDialog = false
  659. EventBus.$emit('success', this.$t('message.message1'))
  660. this.getFollowList()
  661. // }
  662. })
  663. } else {
  664. EventBus.$emit('warning', this.$t('cw.cost.message07'))
  665. return false
  666. }
  667. })
  668. }
  669. }
  670. },
  671. 5000,
  672. { trailing: false }
  673. ),
  674. // 操作 鼠标进入事件
  675. msgRow (row, column, cell, event) {
  676. this.reportRow = row
  677. },
  678. skipPage: throttle(
  679. function (msg) {
  680. if (msg === 'discard') {
  681. this.$confirm(
  682. this.$t('system.fileManagement.message.toDiscarded'),
  683. this.$t('showMessage.hint'),
  684. {
  685. confirmButtonText: this.$t('showMessage.confirm'),
  686. cancelButtonText: this.$t('showMessage.cancel'),
  687. type: 'warning'
  688. }
  689. )
  690. .then(() => {
  691. // this.elLoading()
  692. this.loading = true
  693. discard(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
  694. res => {
  695. // if (res.message === 'Success') {
  696. EventBus.$emit('success', this.$t('message.message1'))
  697. this.getFollowList()
  698. //}
  699. }
  700. )
  701. })
  702. .catch(() => { })
  703. } else if (msg === 'submitReview') {
  704. this.$confirm(
  705. this.$t('system.fileManagement.message.toSubmitForReview'),
  706. this.$t('showMessage.hint'),
  707. {
  708. confirmButtonText: this.$t('showMessage.confirm'),
  709. cancelButtonText: this.$t('showMessage.cancel'),
  710. type: 'warning'
  711. }
  712. ).then(() => {
  713. // this.elLoading()
  714. this.loading = true
  715. toSubmitReview(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
  716. res => {
  717. // if (res.message === 'Success') {
  718. EventBus.$emit('success', this.$t('message.message1'))
  719. this.getFollowList()
  720. //}
  721. }
  722. )
  723. })
  724. } else if (msg === 'Receive') {
  725. this.$confirm(
  726. this.$t('system.fileManagement.message.toReceive'),
  727. this.$t('showMessage.hint'),
  728. {
  729. confirmButtonText: this.$t('showMessage.confirm'),
  730. cancelButtonText: this.$t('showMessage.cancel'),
  731. type: 'warning'
  732. }
  733. )
  734. .then(() => {
  735. // this.elLoading()
  736. this.loading = true
  737. receive(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
  738. res => {
  739. // if (res.message === 'Success') {
  740. EventBus.$emit('success', this.$t('message.message1'))
  741. this.getFollowList()
  742. // }
  743. }
  744. )
  745. })
  746. .catch(() => {
  747. this.loading = false
  748. // this.elLoading('end')
  749. })
  750. } else if (msg === 'send') {
  751. this.$confirm(
  752. this.$t('system.fileManagement.message.toSend'),
  753. this.$t('showMessage.hint'),
  754. {
  755. confirmButtonText: this.$t('showMessage.confirm'),
  756. cancelButtonText: this.$t('showMessage.cancel'),
  757. type: 'warning'
  758. }
  759. )
  760. .then(() => {
  761. // this.elLoading()
  762. this.loading = true
  763. operationSendShip(
  764. this.$qs.stringify({
  765. id: this.reportRow.templateId,
  766. opid: this.reportRow.id
  767. })
  768. ).toPromise().then(res => {
  769. // if (res.message === 'Success') {
  770. EventBus.$emit('success', this.$t('message.message1'))
  771. this.getFollowList()
  772. // }
  773. })
  774. })
  775. .catch(() => {
  776. this.loading = false
  777. // this.elLoading('end')
  778. })
  779. } else if (msg === 'approve') {
  780. this.approveTitle = this.$t('button.approve')
  781. this.auditDialog = true
  782. } else if (msg === 'noapprove') {
  783. this.approveTitle = this.$t('button.noapprove')
  784. this.auditDialog = true
  785. } else if (msg === 'archive') {
  786. this.$confirm(
  787. this.$t('system.fileManagement.message.toArchive'),
  788. this.$t('showMessage.hint'),
  789. {
  790. confirmButtonText: this.$t('showMessage.confirm'),
  791. cancelButtonText: this.$t('showMessage.cancel'),
  792. type: 'warning'
  793. }
  794. )
  795. .then(() => {
  796. // this.elLoading()
  797. this.loading = true
  798. archive(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
  799. res => {
  800. this.loading = false
  801. // if (res.message === 'Success') {
  802. EventBus.$emit('success', this.$t('message.message1'))
  803. this.getFollowList()
  804. // }
  805. }
  806. )
  807. })
  808. .catch(() => {
  809. this.loading = false
  810. // this.elLoading('end')
  811. })
  812. }
  813. },
  814. 5000,
  815. { trailing: false }
  816. ),
  817. // 文件上传 - 我的报表
  818. uploadSuccess () {
  819. this.$refs.upload.handleSaveBill().then(response => {
  820. // this.appendixIds = this._.replace(response, ',', ';')
  821. this.appendixIds = response
  822. })
  823. },
  824. cancelCommitAttach () {
  825. this.checkDialogFlag = false
  826. },
  827. // 文件上传 - 待处理
  828. commitAttach: throttle(
  829. function () {
  830. uploadAttachFile(
  831. this.$qs.stringify({
  832. id: this.attachId,
  833. appendixId: this.appendixIds
  834. })
  835. ).toPromise().then(res => {
  836. // this.dialogSortVisible = false
  837. this.checkDialogFlag = false
  838. })
  839. },
  840. 5000,
  841. { trailing: false }
  842. ),
  843. // 跟踪列表
  844. getFollowList () {
  845. this.tableData = {}
  846. if (!this.loading) {
  847. // this.elLoading()
  848. this.loading = true
  849. }
  850. let api = ''
  851. switch (this.reportTabs) {
  852. case '1':
  853. api = getFileOperationInfoWaitDealWithByPage
  854. break
  855. case '2':
  856. api = getFileOperationInfoTrackByPage
  857. break
  858. default:
  859. api = getAllFileOperationInfoByPage
  860. break
  861. }
  862. api(this.page).toPromise().then(data => {
  863. this.tableData = data
  864. if (this.reportTabs === '1') {
  865. this.$store.commit('app/SET_OPERATION_NUM', data.total)
  866. }
  867. this.loading = false
  868. this.getStatusList()
  869. })
  870. },
  871. resetSearch () {
  872. this.page.searchKeyword = null
  873. },
  874. // 过滤
  875. handleFilter () {
  876. if (this.createDate && this.createDate.length > 0) {
  877. this.page.createStartDate = this.createDate[0]
  878. this.page.createEndDate = this.createDate[1]
  879. } else {
  880. this.page.createStartDate = ''
  881. this.page.createEndDate = ''
  882. }
  883. this.dialogFormVisible = false
  884. this.getFollowList()
  885. },
  886. // 过滤重置/过滤关闭X
  887. clearfiltQuery () {
  888. this.page = {
  889. vesselId: '',
  890. statusFlag: '',
  891. deptId: '',
  892. createStartDate: '',
  893. createEndDate: '',
  894. fileTemplateType: '',
  895. currentPage: 1,
  896. pageSize: 10
  897. }
  898. this.createDate = []
  899. this.dialogFormVisible = false
  900. this.getFollowList()
  901. }
  902. }
  903. }
  904. </script>
  905. <style scoped lang="scss">
  906. .system-operation {
  907. // height: calc(100vh - 112px);
  908. .report-title {
  909. display: flex;
  910. .report-line {
  911. width: 4px;
  912. height: 16px;
  913. background: #1a61d5;
  914. }
  915. .report-word {
  916. font-weight: 700;
  917. font-size: 16px;
  918. margin-left: 5px;
  919. margin-bottom: 20px;
  920. }
  921. }
  922. .selectBtn {
  923. float: right;
  924. display: flex;
  925. position: relative;
  926. }
  927. .selectInput {
  928. width: 280px;
  929. }
  930. .filter-total {
  931. font-size: 14px;
  932. margin-top: 8px;
  933. margin-right: 15px;
  934. min-width: 81px;
  935. }
  936. .guolv {
  937. margin: 0 10px;
  938. span {
  939. color: #000;
  940. }
  941. span:hover {
  942. color: #1d6ced;
  943. }
  944. .svg-icon {
  945. color: #bfbfbf;
  946. }
  947. }
  948. .searchIcon {
  949. font-size: 32px;
  950. position: absolute;
  951. right: 0;
  952. }
  953. /deep/ .myDialogDiv {
  954. .el-dialog {
  955. position: fixed;
  956. top: 42px;
  957. left: 29%;
  958. overflow: auto;
  959. margin: 0;
  960. width: 27em !important;
  961. }
  962. }
  963. /deep/ .error-row {
  964. color: #e74c3c !important;
  965. }
  966. }
  967. </style>