123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973 |
- <!-- 体系操作页面 -->
- <template>
- <TableView class="product"
- @body-height-change="bodyHeightChange">
- <template slot="body">
- <div class="cont-main system-operation">
- <!-- <el-radio-group v-model="reportTabs" size="small" @change="changeStatus">-->
- <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationPending'" label="pendingTodo">{{ $t('system.fileManagement.reportTabs.pendingTodo') }}</el-radio-button>-->
- <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationTracking'" label="following">{{ $t('system.fileManagement.reportTabs.following') }}</el-radio-button>-->
- <!-- <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationAll'" label="all">{{ $t('system.fileManagement.reportTabs.all') }}</el-radio-button>-->
- <!-- <!– <el-radio-button v-hasPermission="'ismManager.SystemOperation.systemOperationFile.systemOperationMyReport'" label="myReports">{{ $t('system.fileManagement.reportTabs.myReports') }}</el-radio-button>–>-->
- <!-- </el-radio-group>-->
- <div class="selectBtn mb10">
- <!-- 筛选输入框 -->
- <!-- 过滤 -->
- <div class="searchTwo">
- <ws-button type="text"
- @click="dialogFormVisible = true"
- class="guolv">
- <i class="iconfont iconfilter" />
- <!-- <svg-icon icon-class="guolv" /> -->
- <span>{{ $t('zs.common.sizer') }}</span>
- </ws-button>
- </div>
- <!-- 共0条结果 -->
- <span class="filter-total">{{ $t('zs.common.thereAre') }}{{ tableData.total
- }}{{ $t('cg.queryresults') }}</span>
- <!-- <ws-input v-model.trim="page.searchKeyword"
- class="selectInput"
- :placeholder="$t('system.fileManagement.tips.operationTips')"
- @clear="resetSearch"
- @keyup.enter.native="handleFilter('title')" />
- //<svg-icon icon-class="searchIcon"
- class="searchIcon"
- @click="handleFilter('title')" /> -->
- <BaseInputSearch v-model="page.searchKeyword"
- :placeholder="$t('system.fileManagement.tips.operationTips')"
- @search="handleFilter('title')" />
- </div>
- <ws-status-radio @changeStatus="changeStatus"
- class="fr mt10"></ws-status-radio>
- <!-- <ws-radio-group-->
- <!-- v-model="reportTabs"-->
- <!-- class="status-list fr"-->
- <!-- style="line-height: 43px"-->
- <!-- @change="changeStatus"-->
- <!-- >-->
- <!-- <el-radio label="1">{{ $t('common.processed') }}</el-radio>-->
- <!-- <el-radio label="2">{{ $t('common.track') }}</el-radio>-->
- <!-- <el-radio label="all">{{ $t('common.all') }}</el-radio>-->
- <!-- </ws-radio-group>-->
- <div>
- <ws-normal-table :data="tableData.records"
- @cell-mouse-enter="msgRow"
- highlight-current-row
- :row-class-name="tableRowClassName"
- style="width: 100%"
- :height="tableViewBodyHeight - 50">
- <ws-table-column prop="operateFlag"
- min-width="50">
- <template slot-scope="scope">
- <span class="el-dropdown-link"
- v-if="
- scope.row.operateFlag * 1 === 2 ||
- scope.row.operateFlag * 1 === 3
- ">
- <img src="@/assets/update.png"
- alt />
- </span>
- </template>
- </ws-table-column>
- <ws-table-column type="index"
- width="50"
- align="center"
- :label="$t('common.num')">
- <template slot-scope="scope">{{
- scope.$index + 1 + (page.currentPage - 1) * page.pageSize
- }}</template>
- </ws-table-column>
- <ws-table-column prop="vesselDepartmentName"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.ShipDepartment')"></ws-table-column>
- <ws-table-column prop="fileName"
- min-width="200"
- show-overflow-tooltip
- :label="$t('system.fileManagement.reportTable.fileName')">
- <template slot-scope="scope">
- <div style="display: flex;align-items: center">
- <span>
- <i class="iconfont iconpdfy"
- v-if="scope.row.fileType === 'pdf'"
- style="font-size: 20px;color: #FF4867" />
- <!-- <img-->
- <!-- v-if="scope.row.fileType === 'pdf'"-->
- <!-- src="@/assets/pdf.png"-->
- <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
- <!-- />-->
- <i class="iconfont iconword"
- v-if="
- scope.row.fileType === 'doc' ||
- scope.row.fileType === 'docx'
- "
- style="font-size: 20px;color: #4A8DFF" />
- <!-- <img-->
- <!-- v-if="-->
- <!-- scope.row.fileType === 'doc' ||-->
- <!-- scope.row.fileType === 'docx'-->
- <!-- "-->
- <!-- src="@/assets/word.png"-->
- <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
- <!-- />-->
- <i class="iconfont iconexcely"
- v-if="
- scope.row.fileType === 'xls' ||
- scope.row.fileType === 'xlsx'
- "
- style="font-size: 20px;color: #00C090" />
- <!-- <img-->
- <!-- v-if="-->
- <!-- scope.row.fileType === 'xls' ||-->
- <!-- scope.row.fileType === 'xlsx'-->
- <!-- "-->
- <!-- src="@/assets/excel.png"-->
- <!-- style="width: 20px;height: 28px;padding-top: 8px;"-->
- <!-- />-->
- </span>
- <a class="clickabled"
- v-if="
- scope.row.statusFlag === '1001' ||
- scope.row.statusFlag === '1003'
- "
- :href="url + scope.row.filePathId + '&showSaveFlag=1'"
- target="_blank">{{ scope.row.fileName }}</a>
- <a class="clickabled"
- v-else-if="scope.row.statusFlag === '1010'"
- :href="
- url +
- scope.row.filePathId +
- '&showSaveFlag=' +
- scope.row.reviewerEdit
- "
- target="_blank">{{ scope.row.fileName }}</a>
- <a class="clickabled"
- v-else-if="scope.row.statusFlag === '1005'"
- :href="url + scope.row.filePathId"
- target="_blank">{{ scope.row.fileName }}</a>
- <a class="clickabled"
- v-else
- :href="url + scope.row.filePathId"
- target="_blank">{{ scope.row.fileName }}</a>
- </div>
- </template>
- </ws-table-column>
- <!-- <ws-table-column prop="version" min-width="150" :label="$t('system.fileManagement.reportTable.versionNum')"></ws-table-column>-->
- <ws-table-column prop="creater"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.initiator')"></ws-table-column>
- <ws-table-column prop="fileReportTypeName"
- min-width="150"
- :label="$t('system.fileManagement.setting.fileType')">
- <template slot-scope="scope">{{
- scope.row.fileReportTypeName == '操作文档' ? '是' : '否'
- }}</template>
- </ws-table-column>
- <ws-table-column prop="uploadDate"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.createTime')"></ws-table-column>
- <ws-table-column prop="lastReportDate"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.lastFilledInTime')"></ws-table-column>
- <ws-table-column prop="status"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.status')"></ws-table-column>
- <ws-table-column prop="operationHisResponseList"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.historyRecord')">
- <template slot-scope="scope">
- <ws-dropdown placement="bottom-start">
- <span class="el-dropdown-link">
- <i class="iconfont iconchangehistoryy" />
- <!-- <img src="@/assets/changeHistory.png" alt />-->
- </span>
- <ws-dropdown-menu slot="dropdown">
- <ws-dropdown-item>
- <ws-normal-table :data="scope.row.operationHisResponseList"
- highlight-current-row>
- <ws-table-column prop="operateUserName"
- width="150"
- :label="
- $t(
- 'system.fileManagement.reportTable.operatePerson'
- )
- "></ws-table-column>
- <ws-table-column prop="operateDate"
- width="150"
- :label="
- $t('system.fileManagement.reportTable.operateDate')
- ">
- <template slot-scope="scope">{{
- scope.row.operateDate
- }}</template>
- </ws-table-column>
- <ws-table-column prop="operateHis"
- width="150"
- :label="
- $t(
- 'system.fileManagement.reportTable.operateHistory'
- )
- "></ws-table-column>
- <ws-table-column prop="dealMsg"
- width="150"
- :label="
- $t(
- 'system.fileManagement.reportTable.reviewReturnComments'
- )
- "></ws-table-column>
- </ws-normal-table>
- </ws-dropdown-item>
- </ws-dropdown-menu>
- </ws-dropdown>
- </template>
- </ws-table-column>
- <ws-table-column prop="certificateName"
- min-width="150"
- :label="$t('system.fileManagement.reportTable.attachment')">
- <template slot-scope="scope">
- <span @click="getAttach(scope)">
- <i class="iconfont iconfujiany" />
- <!-- <img src="@/assets/fujian.png" alt />-->
- {{ scope.row.appendixSize }}
- </span>
- </template>
- </ws-table-column>
- <ws-table-column v-if="reportTabs === '1'"
- prop="statusFlag"
- :label="$t('common.operate')"
- align="center"
- width="80">
- <template slot-scope="scope">
- <yh-operaction :lable="lable"
- :status-flag="scope.row.statusFlag"
- @skip="skipPage" />
- </template>
- </ws-table-column>
- </ws-normal-table>
- </div>
- </div>
- </template>
- <template slot="footer">
- <pagination v-if="tableData.total > 0"
- :total="tableData.total"
- :page.sync="page.currentPage"
- :limit.sync="page.pageSize"
- @pagination="getFollowList" />
- </template>
- <!-- <ws-common-loading v-if="loading"></ws-common-loading> -->
- <!-- 过滤dialog -->
- <div class="myDialogDiv">
- <ws-dialog :title="$t('button.filtration')"
- :visible.sync="dialogFormVisible"
- width="350px"
- :modal="false"
- class="dialogListquery"
- style="margin-left: 56%"
- :close-on-click-modal="false">
- <ws-form ref="spclearsplistqueryForm"
- :model="page"
- label-width="105px"
- label-position="left">
- <!-- 适用船舶 -->
- <ws-form-item :label="$t('system.fileManagement.applicableShip')"
- v-if="vesselBankFlag === 'B'">
- <ws-select filterable clearable
- v-model="page.vesselId"
- style="width:100%"
- :placeholder="$t('common.selected')">
- <ws-option :label="$t('common.selected')"
- value=""></ws-option>
- <ws-option v-for="item in shipOptions"
- :key="item.vesselId"
- :label="item.vesselName"
- :value="item.vesselId"></ws-option>
- </ws-select>
- </ws-form-item>
- <!-- 适用部门 -->
- <ws-form-item :label="$t('system.fileManagement.applicableDepartments')"
- v-if="vesselBankFlag === 'B'">
- <ws-select v-model="page.deptId"
- style="width:100%"
- :placeholder="$t('common.selected')">
- <ws-option :label="$t('common.selected')"
- value=""></ws-option>
- <ws-option v-for="item in deptOptions"
- :key="item.deptId"
- :label="item.deptName"
- :value="item.deptId"></ws-option>
- </ws-select>
- </ws-form-item>
- <!-- 创建时间 -->
- <ws-form-item :label="$t('system.fileManagement.reportTable.createDate')">
- <ws-date-picker v-model="createDate"
- :placeholder="$t('common.selected')"
- type="daterange"
- value-format="yyyy-MM-dd"></ws-date-picker>
- </ws-form-item>
- <!-- 任务类型 -->
- <ws-form-item :label="$t('system.fileManagement.taskType')">
- <ws-select v-model="page.fileTemplateType"
- style="width:100%"
- :placeholder="$t('common.selected')">
- <ws-option :label="$t('common.selected')"
- value=""></ws-option>
- <ws-option :label="$t('system.fileManagement.updateFile')"
- value="1"></ws-option>
- <ws-option :label="$t('system.fileManagement.fillFile')"
- value="2"></ws-option>
- </ws-select>
- </ws-form-item>
- <!-- 状态 -->
- <ws-form-item :label="$t('system.fileManagement.button.status')">
- <ws-select v-model="page.statusFlag"
- style="width:100%"
- :placeholder="$t('common.selected')">
- <ws-option :label="$t('common.selected')"
- value=""></ws-option>
- <ws-option v-for="item in statusOptions"
- :key="item.id"
- :label="item.valueZh"
- :value="item.id"></ws-option>
- </ws-select>
- </ws-form-item>
- </ws-form>
- <div slot="footer"
- class="dialog-footer">
- <ws-button @click="clearfiltQuery">{{
- $t('button.reset')
- }}</ws-button>
- <ws-button type="primary"
- @click="handleFilter()">{{
- $t('button.filtration')
- }}</ws-button>
- </div>
- </ws-dialog>
- </div>
- <!-- 查看附件 -->
- <WinseaContentModal :title="$t('system.fileManagement.viewAttachment')"
- v-model="checkDialogFlag">
- <!-- <ws-common-dialog ref="checkDialog"
- :title="$t('system.fileManagement.viewAttachment')"
- :type="type"
- :normalFooter="false">
- <div slot="body"> -->
- <ws-upload :editable="isUpload"
- ref="upload"
- table-name="ism_file_operation_info"
- oss-key="systemOperation"
- :comp-id="compId"
- :appendix-ids="appendixIds"
- @onChange="uploadSuccess" />
- <!-- </div> -->
- <div slot="footer">
- <ws-button v-if="isUpload"
- type="primary"
- @click="commitAttach">{{
- $t('button.confirm')
- }}</ws-button>
- <ws-button v-if="isUpload"
- @click="cancelCommitAttach">{{
- $t('button.cancel')
- }}</ws-button>
- </div>
- <!-- </ws-common-dialog> -->
- </WinseaContentModal>
- <!--审核流,审核盒子-->
- <WinseaContentModal :title="approveTitle"
- v-model="auditDialogFlag"
- @on-cancel="setBlank"
- @on-done="goSubmitReview">
- <!-- <ws-common-dialog ref="auditDialog"
- :title="approveTitle"
- :type="type"
- @clickSure="goSubmitReview"
- @clickCancel="setBlank">
- <div slot="body"> -->
- <ws-form ref="handle"
- :rules="handles"
- label-width="auto"
- :model="handle">
- <ws-form-item :label="$t('cw.annualBudget.auditOpinion') + $t('common.colon')"
- v-if="approveTitle === this.$t('button.approve')">
- <ws-input v-model="handle.auditMind"
- maxlength="200"
- type="textarea"
- style="width:80%" />
- </ws-form-item>
- <ws-form-item :label="$t('common.returnReason') + $t('common.colon')"
- prop="auditMind"
- v-else-if="approveTitle === this.$t('button.noapprove')">
- <ws-input v-model="handle.auditMind"
- maxlength="200"
- type="textarea"
- style="width:80%" />
- </ws-form-item>
- </ws-form>
- <!-- </div>
- </ws-common-dialog> -->
- </WinseaContentModal>
- </TableView>
- </template>
- <script>
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- import TableView from '@/layout/TableView'
- import TableViewMix from '@/layout/mixin/TableViewMix'
- // 体系操作
- import {
- getFileOperationInfoWaitDealWithByPage,
- getFileOperationInfoTrackByPage,
- getAllFileOperationInfoByPage,
- discard,
- toSubmitReview,
- receive,
- archive,
- operationSendShip,
- reviewPass,
- reviewNotPass,
- getAppShips,
- getDeptListByCompId,
- uploadAttachFile,
- getFileOperationStatusList
- } from '@/model/system'
- import yhOperaction from '@/components/WinseaCom/operaction.vue'
- import { handle } from '@/model/workflow'
- import WsStatusRadio from '@/components/RadioGroup/index'
- import WsShipDropdown from '@/components/ShipDown/index'
- import { throttle } from 'lodash'
- import { EventBus } from 'base-core-lib'
- export default {
- name: 'systemOperation',
- mixins: [TableViewMix],
- components: {
- WsStatusRadio,
- WsShipDropdown,
- Pagination,
- WsUpload,
- yhOperaction,
- TableView
- },
- data () {
- return {
- auditDialogFlag: false,
- checkDialogFlag: false,
- type: 'twoForm',
- fileType: '',
- fileTemplateTypeId: '',
- url: process.env.VUE_APP_BASE_API + '/office/file?fileId=', //config.onlineUrl,
- newFilePath: `saas/${sessionStorage.getItem(
- 'ws-pf_compId'
- )}/system/systemOperation/${this.nowFormatDate('YYYYMMDD')}/appendix/`,
- // config.getUploadPath(
- // 'systemOperation',
- // sessionStorage.getItem('ws-pf_compId')
- // ),
- vesselBankFlag: '',
- shipOptions: [],
- statusOptions: [],
- deptOptions: [],
- payLoading: false,
- approveTitle: '', // 审核盒子title
- dialogApprove: false, // 审核弹框
- handles: {
- auditMind: [{ required: true, trigger: 'blur' }]
- },
- handle: {
- taskId: '',
- approved: true,
- auditMind: '',
- needReapply: true
- },
- lable: [
- {
- lab: this.$t('button.discard'),
- click: 'discard',
- hp: true,
- code: '1001,1002,1003'
- },
- {
- lab: this.$t('button.submitReview'),
- click: 'submitReview',
- hp: true,
- code: '1001,1002,1003'
- },
- {
- lab: this.$t('button.approve'),
- click: 'approve',
- hp: true,
- code: '1010'
- },
- {
- lab: this.$t('button.noapprove'),
- click: 'noapprove',
- hp: true,
- code: '1010'
- },
- {
- lab: this.$t('button.send'),
- click: 'send',
- hp: true,
- code: '1004'
- },
- {
- lab: this.$t('button.Receive'),
- click: 'Receive',
- hp: true,
- code: '1005'
- },
- {
- lab: this.$t('button.archive'),
- click: 'archive',
- hp: true,
- code: '1007'
- }
- ],
- temId: '',
- filePathId: '',
- temName: '',
- dialogSortVisible: false,
- isUpload: false,
- compId: sessionStorage.getItem('ws-pf_compId'),
- appendixIds: '',
- editAppendixIds: '',
- attachId: '',
- reportTabs: '1',
- tableData: {
- records: [{}],
- total: 0
- },
- loading: false,
- page: {
- vesselId: '',
- deptId: '',
- statusFlag: '',
- createStartDate: '',
- createEndDate: '',
- fileTemplateType: '',
- currentPage: 1,
- pageSize: 10,
- searchKeyword: ''
- },
- createDate: [],
- dialogFormVisible: false,
- reportRow: {}
- }
- },
- created () {
- this.vesselBankFlag = sessionStorage.getItem('ws-pf_vesselBankFlag')
- this.getShips()
- this.getFollowList()
- this.getDeptListByCompId()
- },
- methods: {
- changeStatus (key) {
- this.reportTabs = key
- this.page.currentPage = 1
- this.getFollowList()
- },
- // 查看附件
- getAttach (scope) {
- this.appendixIds =
- scope.row.appendixId && scope.row.appendixId.length > 0
- ? scope.row.appendixId.split(';').join(',')
- : ''
- this.attachId = scope.row.id
- if (scope.row.statusFlag === '1001' || scope.row.statusFlag === '1003') {
- this.isUpload = true
- } else {
- this.isUpload = false
- }
- // this.dialogSortVisible = true
- this.checkDialogFlag = true
- // this.appendixIds = this._.map(scope.row.operationHisResponseList, 'appendixId').join(',')
- },
- tableRowClassName ({ row, rowIndex }) {
- if (row.statusFlag === '1001') {
- return 'error-row'
- } else {
- return ''
- }
- },
- // 船舶列表
- getShips () {
- getAppShips({ compId: sessionStorage.getItem('ws-pf_compId') }).toPromise().then(data => {
- this.shipOptions = data
- })
- },
- // 状态列表
- getStatusList () {
- // TODO: 先写死3 不确定全部是啥
- getFileOperationStatusList({ code: this.reportTabs || 3 }).toPromise().then(data => {
- this.statusOptions = data
- })
- },
- // 部门列表
- getDeptListByCompId () {
- getDeptListByCompId({ compId: sessionStorage.getItem('ws-pf_compId') }).toPromise().then(data => {
- this.deptOptions = data
- })
- },
- // 退回按钮
- setBlank () {
- this.auditDialog = false
- this.$refs.handle.resetFields()
- },
- // 审核通过
- goSubmitReview: throttle(
- function () {
- if (this.reportRow.operateFlag === '2') {
- // this.elLoading()
- this.loading = true
- ; (this.handle.taskId = this.reportRow.taskId),
- (this.handle.approved =
- this.approveTitle === this.$t('button.approve'))
- handle({ baseUrl: process.env.VUE_APP_API_ISM, ...this.handle }).toPromise().then(res => {
- if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.auditDialog = false
- this.getFollowList()
- }
- })
- } else {
- // this.elLoading()
- this.loading = true
- if (this.approveTitle === this.$t('button.approve')) {
- this.handle.approved = true
- reviewPass(
- this.$qs.stringify({
- id: this.reportRow.id,
- message: this.handle.auditMind
- })
- ).toPromise().then(res => {
- // if (res.message === 'Success') {
- this.auditDialog = false
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- // }
- })
- } else {
- this.$refs.handle.validate(valid => {
- if (valid) {
- this.handle.approved = false
- reviewNotPass(
- this.$qs.stringify({
- id: this.reportRow.id,
- message: this.handle.auditMind
- })
- ).toPromise().then(res => {
- // if (res.message === 'Success') {
- this.auditDialog = false
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- // }
- })
- } else {
- EventBus.$emit('warning', this.$t('cw.cost.message07'))
- return false
- }
- })
- }
- }
- },
- 5000,
- { trailing: false }
- ),
- // 操作 鼠标进入事件
- msgRow (row, column, cell, event) {
- this.reportRow = row
- },
- skipPage: throttle(
- function (msg) {
- if (msg === 'discard') {
- this.$confirm(
- this.$t('system.fileManagement.message.toDiscarded'),
- this.$t('showMessage.hint'),
- {
- confirmButtonText: this.$t('showMessage.confirm'),
- cancelButtonText: this.$t('showMessage.cancel'),
- type: 'warning'
- }
- )
- .then(() => {
- // this.elLoading()
- this.loading = true
- discard(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
- res => {
- // if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- //}
- }
- )
- })
- .catch(() => { })
- } else if (msg === 'submitReview') {
- this.$confirm(
- this.$t('system.fileManagement.message.toSubmitForReview'),
- this.$t('showMessage.hint'),
- {
- confirmButtonText: this.$t('showMessage.confirm'),
- cancelButtonText: this.$t('showMessage.cancel'),
- type: 'warning'
- }
- ).then(() => {
- // this.elLoading()
- this.loading = true
- toSubmitReview(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
- res => {
- // if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- //}
- }
- )
- })
- } else if (msg === 'Receive') {
- this.$confirm(
- this.$t('system.fileManagement.message.toReceive'),
- this.$t('showMessage.hint'),
- {
- confirmButtonText: this.$t('showMessage.confirm'),
- cancelButtonText: this.$t('showMessage.cancel'),
- type: 'warning'
- }
- )
- .then(() => {
- // this.elLoading()
- this.loading = true
- receive(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
- res => {
- // if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- // }
- }
- )
- })
- .catch(() => {
- this.loading = false
- // this.elLoading('end')
- })
- } else if (msg === 'send') {
- this.$confirm(
- this.$t('system.fileManagement.message.toSend'),
- this.$t('showMessage.hint'),
- {
- confirmButtonText: this.$t('showMessage.confirm'),
- cancelButtonText: this.$t('showMessage.cancel'),
- type: 'warning'
- }
- )
- .then(() => {
- // this.elLoading()
- this.loading = true
- operationSendShip(
- this.$qs.stringify({
- id: this.reportRow.templateId,
- opid: this.reportRow.id
- })
- ).toPromise().then(res => {
- // if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- // }
- })
- })
- .catch(() => {
- this.loading = false
- // this.elLoading('end')
- })
- } else if (msg === 'approve') {
- this.approveTitle = this.$t('button.approve')
- this.auditDialog = true
- } else if (msg === 'noapprove') {
- this.approveTitle = this.$t('button.noapprove')
- this.auditDialog = true
- } else if (msg === 'archive') {
- this.$confirm(
- this.$t('system.fileManagement.message.toArchive'),
- this.$t('showMessage.hint'),
- {
- confirmButtonText: this.$t('showMessage.confirm'),
- cancelButtonText: this.$t('showMessage.cancel'),
- type: 'warning'
- }
- )
- .then(() => {
- // this.elLoading()
- this.loading = true
- archive(this.$qs.stringify({ id: this.reportRow.id })).toPromise().then(
- res => {
- this.loading = false
- // if (res.message === 'Success') {
- EventBus.$emit('success', this.$t('message.message1'))
- this.getFollowList()
- // }
- }
- )
- })
- .catch(() => {
- this.loading = false
- // this.elLoading('end')
- })
- }
- },
- 5000,
- { trailing: false }
- ),
- // 文件上传 - 我的报表
- uploadSuccess () {
- this.$refs.upload.handleSaveBill().then(response => {
- // this.appendixIds = this._.replace(response, ',', ';')
- this.appendixIds = response
- })
- },
- cancelCommitAttach () {
- this.checkDialogFlag = false
- },
- // 文件上传 - 待处理
- commitAttach: throttle(
- function () {
- uploadAttachFile(
- this.$qs.stringify({
- id: this.attachId,
- appendixId: this.appendixIds
- })
- ).toPromise().then(res => {
- // this.dialogSortVisible = false
- this.checkDialogFlag = false
- })
- },
- 5000,
- { trailing: false }
- ),
- // 跟踪列表
- getFollowList () {
- this.tableData = {}
- if (!this.loading) {
- // this.elLoading()
- this.loading = true
- }
- let api = ''
- switch (this.reportTabs) {
- case '1':
- api = getFileOperationInfoWaitDealWithByPage
- break
- case '2':
- api = getFileOperationInfoTrackByPage
- break
- default:
- api = getAllFileOperationInfoByPage
- break
- }
- api(this.page).toPromise().then(data => {
- this.tableData = data
- if (this.reportTabs === '1') {
- this.$store.commit('app/SET_OPERATION_NUM', data.total)
- }
- this.loading = false
- this.getStatusList()
- })
- },
- resetSearch () {
- this.page.searchKeyword = null
- },
- // 过滤
- handleFilter () {
- if (this.createDate && this.createDate.length > 0) {
- this.page.createStartDate = this.createDate[0]
- this.page.createEndDate = this.createDate[1]
- } else {
- this.page.createStartDate = ''
- this.page.createEndDate = ''
- }
- this.dialogFormVisible = false
- this.getFollowList()
- },
- // 过滤重置/过滤关闭X
- clearfiltQuery () {
- this.page = {
- vesselId: '',
- statusFlag: '',
- deptId: '',
- createStartDate: '',
- createEndDate: '',
- fileTemplateType: '',
- currentPage: 1,
- pageSize: 10
- }
- this.createDate = []
- this.dialogFormVisible = false
- this.getFollowList()
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .system-operation {
- // height: calc(100vh - 112px);
- .report-title {
- display: flex;
- .report-line {
- width: 4px;
- height: 16px;
- background: #1a61d5;
- }
- .report-word {
- font-weight: 700;
- font-size: 16px;
- margin-left: 5px;
- margin-bottom: 20px;
- }
- }
- .selectBtn {
- float: right;
- display: flex;
- position: relative;
- }
- .selectInput {
- width: 280px;
- }
- .filter-total {
- font-size: 14px;
- margin-top: 8px;
- margin-right: 15px;
- min-width: 81px;
- }
- .guolv {
- margin: 0 10px;
- span {
- color: #000;
- }
- span:hover {
- color: #1d6ced;
- }
- .svg-icon {
- color: #bfbfbf;
- }
- }
- .searchIcon {
- font-size: 32px;
- position: absolute;
- right: 0;
- }
- /deep/ .myDialogDiv {
- .el-dialog {
- position: fixed;
- top: 42px;
- left: 29%;
- overflow: auto;
- margin: 0;
- width: 27em !important;
- }
- }
- /deep/ .error-row {
- color: #e74c3c !important;
- }
- }
- </style>
|