[add] 企标库-企业标准
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { getAction } from './manage'
|
||||
|
||||
const getEnterpriseStandardTableHeader = (params) => getAction('', params)
|
||||
const getEnterpriseStandardSearchForm = (params) => getAction('', params)
|
||||
|
||||
export {
|
||||
getEnterpriseStandardTableHeader,
|
||||
getEnterpriseStandardSearchForm
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
const system = require('./system/en.js')
|
||||
const personalCenter = require('./personalCenter/en.js')
|
||||
const standardRegulationLibrary = require('./standardRegulationLibrary/en-us')
|
||||
const enterpriseStandardLibrary = require('./enterpriseStandardLibrary/en.js')
|
||||
|
||||
module.exports = {
|
||||
// 共用
|
||||
@@ -124,6 +125,7 @@ module.exports = {
|
||||
tips: 'Tips',
|
||||
exportTip: 'Exporting, please wait',
|
||||
fileDownloadFail: 'File download failure',
|
||||
pleaseEnterTreeSystem: 'Please enter the tree system',
|
||||
// 树右键
|
||||
treeRight: {
|
||||
addFolder: 'Create New Folder',
|
||||
@@ -492,5 +494,7 @@ module.exports = {
|
||||
// 个人中心
|
||||
personalCenter,
|
||||
// 标准法规库
|
||||
standardRegulationLibrary
|
||||
standardRegulationLibrary,
|
||||
// 企标库
|
||||
enterpriseStandardLibrary
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// 企标库的所有翻译
|
||||
module.exports = {
|
||||
// 企业标准
|
||||
enterpriseStandard: {
|
||||
allocationStandard: 'Allocation Standard',
|
||||
shiftOutStandard: 'Shift Out Standard',
|
||||
initChange: 'Initiate Changes',
|
||||
temporaryPermissionSet: 'Temporary Permission Setting'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// 企标库的所有翻译
|
||||
module.exports = {
|
||||
// 企业标准
|
||||
enterpriseStandard: {
|
||||
allocationStandard: '配置标准',
|
||||
shiftOutStandard: '移出标准',
|
||||
initChange: '发起更改',
|
||||
temporaryPermissionSet: '临时权限设置',
|
||||
collection: '收藏',
|
||||
cancelCollection: '取消收藏',
|
||||
templateExport: '企业标准模板'
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
const system = require('./system/zh.js')
|
||||
const personalCenter = require('./personalCenter/zh.js')
|
||||
const standardRegulationLibrary = require('./standardRegulationLibrary/zh-cn')
|
||||
const enterpriseStandardLibrary = require('./enterpriseStandardLibrary/zh.js')
|
||||
|
||||
module.exports = {
|
||||
// 共用
|
||||
@@ -124,6 +125,7 @@ module.exports = {
|
||||
tips: '提示',
|
||||
exportTip: '正在导出,请稍候',
|
||||
fileDownloadFail: '文件下载失败',
|
||||
pleaseEnterTreeSystem: '输入树状图体系',
|
||||
// 树右键
|
||||
treeRight: {
|
||||
addFolder: '新增文件夹',
|
||||
@@ -502,5 +504,7 @@ module.exports = {
|
||||
// 个人中心
|
||||
personalCenter,
|
||||
// 标准法规库
|
||||
standardRegulationLibrary
|
||||
standardRegulationLibrary,
|
||||
// 企标库
|
||||
enterpriseStandardLibrary
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="box-title-text">
|
||||
<a-input class="box-input" :value="value" :title="value" @click="standardClick"
|
||||
<a-input class="box-input" :value="value" :title="value" @input="indexClick($event)"
|
||||
:disabled="isDisabled" readonly
|
||||
:placeholder="!isDisabled?$t('pleaseSelect')+query.dbFieldTxt:query.dbFieldTxt"/>
|
||||
:placeholder="!isDisabled?$t('pleaseEnterOrSelect')+query.dbFieldTxt:query.dbFieldTxt"/>
|
||||
<a-button v-if="!isDisabled" type="primary" class="button-box" @click="standardClick">
|
||||
{{this.$t('standardSelect.standardSelection')}}
|
||||
</a-button>
|
||||
@@ -153,7 +153,7 @@ export default {
|
||||
serialNumber.push(res.serial_number)
|
||||
replaceStandardId.push(res.id)
|
||||
})
|
||||
// this.$emit('input', serialNumber.join(','))
|
||||
this.$emit('input', serialNumber.join(','))
|
||||
this.$emit('change', this.query.dbFieldName, replaceStandardId.join(','))
|
||||
// this.$emit('changecontent', this.content)
|
||||
this.visible = false
|
||||
@@ -161,9 +161,9 @@ export default {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
// indexClick (event) {
|
||||
// this.$emit('input', event.target.value)
|
||||
// },
|
||||
indexClick (event) {
|
||||
this.$emit('input', event.target.value)
|
||||
},
|
||||
onSelectChange (value, row) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowList = row
|
||||
|
||||
@@ -315,6 +315,39 @@ export const ConfigurableTableMixin = {
|
||||
modalLoading.destroy()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 带文件导出
|
||||
* @param fileName
|
||||
*/
|
||||
handleFileExport (fileName) {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
fileName = '带文件导出文件'
|
||||
}
|
||||
const param = this.getQueryParams()
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
param.selections = this.selectedRowKeys.join(',')
|
||||
}
|
||||
console.log('导出参数', param)
|
||||
// 加一个大的提示
|
||||
const modalLoading = this.$info({
|
||||
title: this.$t('tips'),
|
||||
content: <span>{this.$t('exportTip')}
|
||||
<a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
this.$nextTick(() => {
|
||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||
})
|
||||
downFile(this.url.exportZipUrl, param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
}
|
||||
}).finally(() => {
|
||||
// 销毁这个提示
|
||||
modalLoading.destroy()
|
||||
})
|
||||
},
|
||||
// 下载导入模板
|
||||
downTemplate (fileName) {
|
||||
if (!fileName || typeof fileName !== 'string') {
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<a-card :bordered="false" class="page-left-right-layout">
|
||||
<div class="page-left-box">
|
||||
<!-- $t('standardRegulationLibrary.domesticStandard.treeSearchPlaceholder')-->
|
||||
<a-input-search v-model="treeInput" :placeholder="$t('pleaseEnterTreeSystem')"
|
||||
@search="handleTableSearch" />
|
||||
<img src="">
|
||||
<a-tree :show-line="true" :show-icon="true" :tree-data=treeData>
|
||||
<template #iconCustom="{title}">
|
||||
<div class="tree-node">
|
||||
<img src="@/assets/image/common/iconTreeFolder.png" class="tree-node-icon" />
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
{{ title }}
|
||||
</template>
|
||||
<span class="tree-node-title">{{ title }}</span>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #custom="{title, key}">
|
||||
<div class="tree-operate-node" @mouseenter="handleTreeMouseover(key)" @mouseleave="handleTreeMouseout(key)">
|
||||
<a-tooltip>
|
||||
<template #title>
|
||||
{{ title }}
|
||||
</template>
|
||||
<span class="tree-node-custom-title">{{ title }}</span>
|
||||
</a-tooltip>
|
||||
<template v-if="key === mouseInNodeKey">
|
||||
<a-button icon="plus" class="tree-operate-node-btn">
|
||||
</a-button>
|
||||
<a-button class="tree-operate-node-btn">
|
||||
<img src="@/assets/image/common/iconTreeEdit.png" />
|
||||
</a-button>
|
||||
<a-button class="tree-operate-node-btn">
|
||||
<img src="@/assets/image/common/iconTreeDelete.png" />
|
||||
</a-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</a-tree>
|
||||
</div>
|
||||
<div class="page-right-box">
|
||||
<div class="table-page-search-wrapper">
|
||||
<search ref="searchRef"
|
||||
:flag="flag"
|
||||
:get-query-condition-func="getQueryConditionFunc"
|
||||
@search="searchQuery"
|
||||
@reset="searchReset" />
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('newlyAdded') }}
|
||||
</div>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<div class="operator-text">
|
||||
<a-icon type="upload" />
|
||||
{{ $t('import') }}
|
||||
</div>
|
||||
</a-upload>
|
||||
<div class="operator-text" @click="handleExportXls">
|
||||
<a-icon type="export" />
|
||||
{{ $t('export') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleFileExport">
|
||||
<a-icon type="mail" />
|
||||
{{ $t('exportWithFile') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="downTemplate($t('enterpriseStandardLibrary.enterpriseStandard.templateExport'))">
|
||||
<a-icon type="download" />
|
||||
{{ $t('templateDownload') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="batchDel">
|
||||
<a-icon type="delete" />
|
||||
{{ $t('batchDelete') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleAllocationStandard">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('enterpriseStandardLibrary.enterpriseStandard.allocationStandard') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleShiftOutStandard">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('enterpriseStandardLibrary.enterpriseStandard.shiftOutStandard') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleInitChange">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('enterpriseStandardLibrary.enterpriseStandard.initChange') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleTemporaryPermissSet">
|
||||
<a-icon type="setting" />
|
||||
{{ $t('enterpriseStandardLibrary.enterpriseStandard.temporaryPermissionSet') }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
<!-- 在混入里已经过滤过没有权限的按钮了 -->
|
||||
<template slot="operation" slot-scope="{text, record}">
|
||||
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" @click="operationClick(operation,record)">
|
||||
<template v-if="operation.text === $t('enterpriseStandardLibrary.enterpriseStandard.collection')">
|
||||
{{ !record.collectFlag || record.collectFlag === '0' ? $t('enterpriseStandardLibrary.enterpriseStandard.collection') : $t('enterpriseStandardLibrary.enterpriseStandard.cancelCollection')
|
||||
}}
|
||||
</template>
|
||||
</a>
|
||||
<a-divider v-if="operationList.length >= operateMaxNum" type="vertical" />
|
||||
<a-dropdown v-if="operationList.length >= operateMaxNum">
|
||||
<a class="ant-dropdown-link">
|
||||
{{ $t('more') }} <a-icon type="down"/>
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
||||
<a @click="operationClick(operation,record)">
|
||||
{{ operation.text }}
|
||||
</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
<!-- 详情-->
|
||||
<template slot="detailClick" slot-scope="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text textName" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
// 搜索组件
|
||||
import Search from '@/components/customField/Search'
|
||||
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
|
||||
import { getEnterpriseStandardTableHeader, getEnterpriseStandardSearchForm } from '@api/enterpriseStandardLibraryApi'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardList',
|
||||
components: { JTable, Search },
|
||||
mixins: [ConfigurableTableMixin],
|
||||
data () {
|
||||
return {
|
||||
flag: '3',
|
||||
treeInput: '', // 左侧树搜索框内容
|
||||
treeData: [], // 左侧树数据
|
||||
mouseInNodeKey: null, // 鼠标悬浮的节点key值
|
||||
operationList: [
|
||||
{
|
||||
text: this.$t('enterpriseStandardLibrary.enterpriseStandard.collection'),
|
||||
clickEvent: 'handleCollection',
|
||||
has: 'enterpriseStandard:collection'
|
||||
},
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'enterpriseStandard:edit'
|
||||
},
|
||||
{
|
||||
text: this.$t('share'),
|
||||
clickEvent: 'handleShare',
|
||||
has: 'enterpriseStandard:share'
|
||||
},
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'enterpriseStandard:delete'
|
||||
}
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
loading: false,
|
||||
getTableHeaderFunc: getEnterpriseStandardTableHeader,
|
||||
getQueryConditionFunc: getEnterpriseStandardSearchForm,
|
||||
// url传参严格按照当前命名
|
||||
url: {
|
||||
list: '/laws/common/getCommonPage', // 表格数据
|
||||
getAddForm: '/laws/common/getFormModel', // 表单的字段
|
||||
addInfo: '', // 新增
|
||||
updateInfo: '', // 编辑
|
||||
getDocumentInfo: '', // 查看
|
||||
delete: '', // 删除
|
||||
deleteBatch: '', // 批量删除
|
||||
importUrl: '', // 导入
|
||||
exportXlsUrl: '', // 导出
|
||||
exportZipUrl: '', // 带文件导出
|
||||
downTemplateUrl: '' // 下载导入模板
|
||||
},
|
||||
showAction: true, // 是否显示操作列
|
||||
dataSource: [
|
||||
{
|
||||
collectFlag: '0',
|
||||
id: 'fd045f5c5d734087a884a63664ee91f1',
|
||||
issue_time: '',
|
||||
region: '',
|
||||
serial_number: '0621001编号',
|
||||
state: '现行',
|
||||
subscribeFlag: '0',
|
||||
technology_territory: '',
|
||||
title: '0621001标题',
|
||||
title_en: '0621001Title'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 左侧树搜索
|
||||
handleTableSearch () {
|
||||
|
||||
},
|
||||
// 左侧树鼠标移入某一目录
|
||||
handleTreeMouseover (key) {
|
||||
this.mouseInNodeKey = key
|
||||
},
|
||||
// 左侧树鼠标移出某一目录
|
||||
handleTreeMouseout (key) {
|
||||
if (this.mouseInNodeKey === key) {
|
||||
this.mouseInNodeKey = null
|
||||
}
|
||||
},
|
||||
// 配置标准
|
||||
handleAllocationStandard () {
|
||||
|
||||
},
|
||||
// 移出标准
|
||||
handleShiftOutStandard () {
|
||||
|
||||
},
|
||||
// 发起更改
|
||||
handleInitChange () {
|
||||
|
||||
},
|
||||
// 临时权限设置
|
||||
handleTemporaryPermissSet () {
|
||||
|
||||
},
|
||||
// 操作栏的点击
|
||||
operationClick (operation, record) {
|
||||
if (operation.clickEvent === 'handleDelete') {
|
||||
this.handleDelete(record.id)
|
||||
} else {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
// 收藏
|
||||
handleCollection (record) {
|
||||
|
||||
},
|
||||
// 分享
|
||||
handleShare (record) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .ant-tree li span.ant-tree-iconEle {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tree-icon {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.tree-operate-node {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
|
||||
&-btn {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: rgba(213, 44, 38, 0.08);
|
||||
border-radius: 2px 2px 2px 2px;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 4px;
|
||||
padding: 0;
|
||||
|
||||
/deep/ .anticon {
|
||||
margin-top: 2px;
|
||||
color: #D52C26;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user