|
|
@ -57,27 +57,30 @@ |
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 新增 --> |
|
|
<!-- 新增 --> |
|
|
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkxz']">{{ |
|
|
|
|
|
$t('form.add') }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkxz']">{{ |
|
|
|
|
|
$t('form.add') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkdr']">{{ |
|
|
|
|
|
$t('page.business.resource.gsp.dr') }}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkdr']">{{ |
|
|
|
|
|
$t('page.business.resource.gsp.dr') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 批量归档 --> |
|
|
<!-- 批量归档 --> |
|
|
<el-button type="primary" :disabled="multiple" @click="handlePlgd" v-hasPermi="['business:resource:gsp:rkgd']">{{ |
|
|
|
|
|
|
|
|
<el-button type="primary" :disabled="multiple" @click="handlePlgd" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkgd']">{{ |
|
|
$t('page.business.resource.gsp.plgd') }}</el-button> |
|
|
$t('page.business.resource.gsp.plgd') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 批量锁定 --> |
|
|
<!-- 批量锁定 --> |
|
|
<el-button type="primary" :disabled="multiple" @click="handlePlsd" v-hasPermi="['business:resource:gsp:rksd']">{{ |
|
|
|
|
|
|
|
|
<el-button type="primary" :disabled="multiple" @click="handlePlsd" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rksd']">{{ |
|
|
$t('page.business.resource.gsp.plsd') }}</el-button> |
|
|
$t('page.business.resource.gsp.plsd') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<!-- 导出 --> |
|
|
<!-- 导出 --> |
|
|
<el-button type="primary" :disabled="multiple" @click="handleDc" v-hasPermi="['business:resource:gsp:rkdc']">{{ |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="exportExcel" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkdc']">{{ |
|
|
$t('form.export') }}</el-button> |
|
|
$t('form.export') }}</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -88,7 +91,7 @@ |
|
|
:show-overflow-tooltip="true" /> |
|
|
:show-overflow-tooltip="true" /> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.ph')" align="center" prop="ph" |
|
|
<el-table-column :label="$t('page.business.resource.gsp.ph')" align="center" prop="ph" |
|
|
:show-overflow-tooltip="true" /> |
|
|
:show-overflow-tooltip="true" /> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.gg')" align="center" > |
|
|
|
|
|
|
|
|
<el-table-column :label="$t('page.business.resource.gsp.gg')" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.gg }} {{ scope.row.ggdw }} |
|
|
{{ scope.row.gg }} {{ scope.row.ggdw }} |
|
|
</template> |
|
|
</template> |
|
|
@ -97,7 +100,7 @@ |
|
|
:show-overflow-tooltip="true" /> |
|
|
:show-overflow-tooltip="true" /> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.rkl')" align="center" width="150px"> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.rkl')" align="center" width="150px"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
{{ scope.row.rkl }} {{ scope.row.rkdl }} |
|
|
|
|
|
|
|
|
{{ scope.row.rkl }} {{ scope.row.rkdw }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.cctj')" align="center" prop="cctj" /> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.cctj')" align="center" prop="cctj" /> |
|
|
@ -123,26 +126,32 @@ |
|
|
class-name="small-padding fixed-width" width="250px"> |
|
|
class-name="small-padding fixed-width" width="250px"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 编辑 --> |
|
|
<!-- 编辑 --> |
|
|
<el-button v-if="scope.row.jlzt == 1" type="text" @click="handleBj(scope.row)" v-hasPermi="['business:resource:gsp:rkbj']">{{ |
|
|
|
|
|
|
|
|
<el-button v-if="scope.row.jlzt == 1" type="text" @click="handleBj(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkbj']">{{ |
|
|
$t('form.edit') }}</el-button> |
|
|
$t('form.edit') }}</el-button> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<el-button v-if="scope.row.jlzt == 1 || scope.row.jlzt == 3 || scope.row.jlzt == 7" type="text" |
|
|
<el-button v-if="scope.row.jlzt == 1 || scope.row.jlzt == 3 || scope.row.jlzt == 7" type="text" |
|
|
@click="handleXq(scope.row)" v-hasPermi="['business:resource:gsp:rkxq']">{{ |
|
|
@click="handleXq(scope.row)" v-hasPermi="['business:resource:gsp:rkxq']">{{ |
|
|
$t('page.business.resource.gsp.detail') }}</el-button> |
|
|
$t('page.business.resource.gsp.detail') }}</el-button> |
|
|
<!-- 锁定 --> |
|
|
<!-- 锁定 --> |
|
|
<el-button type="text" v-if="scope.row.jlzt == 1" @click="handleSd(scope.row)" v-hasPermi="['business:resource:gsp:rksd']">{{ |
|
|
|
|
|
|
|
|
<el-button type="text" v-if="scope.row.jlzt == 1" @click="handleSd(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rksd']">{{ |
|
|
$t('page.business.resource.gsp.lock') }}</el-button> |
|
|
$t('page.business.resource.gsp.lock') }}</el-button> |
|
|
<!-- 解锁 --> |
|
|
<!-- 解锁 --> |
|
|
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleJs(scope.row)" v-hasPermi="['business:resource:gsp:rkjs']">{{ |
|
|
|
|
|
|
|
|
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleJs(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkjs']">{{ |
|
|
$t('page.business.resource.gsp.unlock') }}</el-button> |
|
|
$t('page.business.resource.gsp.unlock') }}</el-button> |
|
|
<!-- 归档 --> |
|
|
<!-- 归档 --> |
|
|
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleGd(scope.row)" v-hasPermi="['business:resource:gsp:rkgd']">{{ |
|
|
|
|
|
|
|
|
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleGd(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkgd']">{{ |
|
|
$t('page.business.resource.gsp.guidang') }}</el-button> |
|
|
$t('page.business.resource.gsp.guidang') }}</el-button> |
|
|
<!-- 解档 --> |
|
|
<!-- 解档 --> |
|
|
<el-button type="text" v-if="scope.row.jlzt == 7" @click="handleJd(scope.row)" v-hasPermi="['business:resource:gsp:rkjd']">{{ |
|
|
|
|
|
|
|
|
<el-button type="text" v-if="scope.row.jlzt == 7" @click="handleJd(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkjd']">{{ |
|
|
$t('page.business.resource.gsp.jiedang') }}</el-button> |
|
|
$t('page.business.resource.gsp.jiedang') }}</el-button> |
|
|
<!-- 借阅 --> |
|
|
<!-- 借阅 --> |
|
|
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1" @click="handleJy(scope.row)" v-hasPermi="['business:resource:gsp:rkjy']">{{ |
|
|
|
|
|
|
|
|
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1" @click="handleJy(scope.row)" |
|
|
|
|
|
v-hasPermi="['business:resource:gsp:rkjy']">{{ |
|
|
$t('page.business.resource.gsp.jieyue') }}</el-button> |
|
|
$t('page.business.resource.gsp.jieyue') }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -180,10 +189,10 @@ import Jd from "./rkjl/Jd"; |
|
|
import Xq from "./rkjl/Xq"; |
|
|
import Xq from "./rkjl/Xq"; |
|
|
import Xz from "./rkjl/Xz"; |
|
|
import Xz from "./rkjl/Xz"; |
|
|
import Bj from "./rkjl/Bj"; |
|
|
import Bj from "./rkjl/Bj"; |
|
|
|
|
|
|
|
|
|
|
|
import { deepClone } from "@/utils/index"; |
|
|
export default { |
|
|
export default { |
|
|
name: "FfjlList", |
|
|
name: "FfjlList", |
|
|
components: { Sd, Js, Gd, Jd, Jy, Xq, Xz, Bj }, |
|
|
|
|
|
|
|
|
components: { Sd, Js, Gd, Jd, Jy, Xq, Xz, Bj }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
daterangeCk: [], |
|
|
daterangeCk: [], |
|
|
@ -217,8 +226,115 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//导出 |
|
|
//导出 |
|
|
handleDc() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exportExcel() { |
|
|
|
|
|
let that = this |
|
|
|
|
|
that.$modal.loading() |
|
|
|
|
|
let params = deepClone(this.queryParams) |
|
|
|
|
|
params.pageSize = 999999 |
|
|
|
|
|
list(params).then(response => { |
|
|
|
|
|
var tabelStr = |
|
|
|
|
|
'<table border="1" class="html-tabel">' + |
|
|
|
|
|
'<tr style="background:#eee;">' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.mc') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.ph') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.gg') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.rksj') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.kcl') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.cctj') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.zysx') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jlzt') + '</th>' + |
|
|
|
|
|
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jyzt') + '</th>' + |
|
|
|
|
|
' </tr>' |
|
|
|
|
|
let _datastr = '' |
|
|
|
|
|
_.forEach(response.rows, function (value) { |
|
|
|
|
|
let jlzt = '' |
|
|
|
|
|
switch (value.jlzt) { |
|
|
|
|
|
case 1: |
|
|
|
|
|
jlzt = that.$t('page.business.resource.resource.jlzt.wsd') |
|
|
|
|
|
break |
|
|
|
|
|
case 3: |
|
|
|
|
|
jlzt = that.$t('page.business.resource.resource.jlzt.ysd') |
|
|
|
|
|
break |
|
|
|
|
|
case 5: |
|
|
|
|
|
jlzt = that.$t('page.business.resource.resource.jlzt.dgd') |
|
|
|
|
|
break |
|
|
|
|
|
case 7: |
|
|
|
|
|
jlzt = that.$t('page.business.resource.resource.jlzt.gd') |
|
|
|
|
|
break |
|
|
|
|
|
case 9: |
|
|
|
|
|
jlzt = that.$t('page.business.resource.resource.jlzt.djd') |
|
|
|
|
|
break |
|
|
|
|
|
default: jlzt = '' |
|
|
|
|
|
} |
|
|
|
|
|
let jyzt = '' |
|
|
|
|
|
switch (value.jyzt) { |
|
|
|
|
|
case 1: |
|
|
|
|
|
jyzt = that.$t('page.business.resource.resource.jyzt.wjy') |
|
|
|
|
|
break |
|
|
|
|
|
case 3: |
|
|
|
|
|
jyzt = that.$t('page.business.resource.resource.jyzt.djy') |
|
|
|
|
|
break |
|
|
|
|
|
case 5: |
|
|
|
|
|
jyzt = that.$t('page.business.resource.resource.jyzt.jyz') |
|
|
|
|
|
break |
|
|
|
|
|
default: jyzt = '' |
|
|
|
|
|
} |
|
|
|
|
|
_datastr = |
|
|
|
|
|
_datastr + |
|
|
|
|
|
'<tr style="text-align: center;">' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.mc + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
' ' + value.ph + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.gg + value.ggdw + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.rksj + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.rkl + value.rkdw + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.cctj + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
value.zysx + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
jlzt + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
' <td>' + |
|
|
|
|
|
jyzt + |
|
|
|
|
|
'</td>' + |
|
|
|
|
|
'</tr>' |
|
|
|
|
|
}) |
|
|
|
|
|
tabelStr = tabelStr + _datastr + ' <table>' |
|
|
|
|
|
// Worksheet名 |
|
|
|
|
|
var worksheet = that.$t('page.business.resource.gsp.gsprkjl') |
|
|
|
|
|
var uri = 'data:application/vnd.ms-excel;base64,' |
|
|
|
|
|
// 真正要导出(下载)的HTML模板 |
|
|
|
|
|
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" |
|
|
|
|
|
xmlns="http://www.w3.org/TR/REC-html40"> |
|
|
|
|
|
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet> |
|
|
|
|
|
<x:Name>${worksheet}</x:Name> |
|
|
|
|
|
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet> |
|
|
|
|
|
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> |
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
${tabelStr} |
|
|
|
|
|
</body> |
|
|
|
|
|
</html>` |
|
|
|
|
|
var a = document.createElement('a') |
|
|
|
|
|
a.download = worksheet + '.xls' |
|
|
|
|
|
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate))) |
|
|
|
|
|
a.click() |
|
|
|
|
|
that.$modal.closeLoading() |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
that.$modal.closeLoading() |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleBj(row) { |
|
|
handleBj(row) { |
|
|
this.$refs.Bj.show(row) |
|
|
this.$refs.Bj.show(row) |
|
|
|