From c7c1a9aa277f180dbde27a0489cdabbf542b684f Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Fri, 8 Sep 2023 17:42:21 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E5=A2=9E=E5=8A=A0=E4=BC=81=E6=A0=87?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C=E6=9C=AA=E5=AE=8C=E5=85=A8?=
=?UTF-8?q?=E5=86=99=E5=AE=8C=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BC=81=E6=A0=87?=
=?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=BC=B9=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/enterpriseStandardLibraryApi.js | 23 +-
.../lang/enterpriseStandardLibrary/zh.js | 26 +-
src/components/menu/SideMenu.vue | 4 +
src/mixins/ConfigurableTableMixin.js | 5 +-
.../publicize/EnterpriseStandardPublicize.vue | 231 ++++++++++++++++++
.../standard/EnterpriseStandardList.vue | 168 ++++++++++---
.../detail/EnterpriseStandardDetail.vue | 133 ++++++++++
.../modules/EnterpriseStandardModal.vue | 3 +
.../modules/TemporaryPermissionSet.vue | 128 ++++++++++
9 files changed, 682 insertions(+), 39 deletions(-)
create mode 100644 src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue
create mode 100644 src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
create mode 100644 src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionSet.vue
diff --git a/src/api/enterpriseStandardLibraryApi.js b/src/api/enterpriseStandardLibraryApi.js
index 7db48d33..c218064c 100644
--- a/src/api/enterpriseStandardLibraryApi.js
+++ b/src/api/enterpriseStandardLibraryApi.js
@@ -8,10 +8,31 @@ const getEnterpriseStandardSearchForm = (params) => getAction('/laws/standard/en
const getEnterpriseStandardAddForm = (params) => getAction('/laws/standard/enterprise/getFormModel', params)
// 根据id获取详情
const getEnterpriseStandardInfoById = (params) => getAction('/laws/standard/enterprise/getByIdAndModule', params)
+// 配置标准
+const allocationStandard = (params) => getAction('', params)
+// 移出标准
+const shiftStandard = (params) => getAction('', params)
+// 获取左侧树列表
+const getTreeList = (params) => getAction('', params)
+// 发起变更
+const initChange = (params) => getAction('', params)
+// 临时权限设置
+const temporaryPermissionSet = (params) => getAction('', params)
+// 收藏企标
+const collectStandard = (params) => getAction('', params)
+// 分享企标
+const shareStandard = (params) => getAction('', params)
export {
getEnterpriseStandardTableHeader,
getEnterpriseStandardSearchForm,
getEnterpriseStandardAddForm,
- getEnterpriseStandardInfoById
+ getEnterpriseStandardInfoById,
+ allocationStandard,
+ shiftStandard,
+ getTreeList,
+ initChange,
+ temporaryPermissionSet,
+ collectStandard,
+ shareStandard
}
diff --git a/src/common/lang/enterpriseStandardLibrary/zh.js b/src/common/lang/enterpriseStandardLibrary/zh.js
index 37df4b40..7db1e284 100644
--- a/src/common/lang/enterpriseStandardLibrary/zh.js
+++ b/src/common/lang/enterpriseStandardLibrary/zh.js
@@ -1,13 +1,35 @@
// 企标库的所有翻译
module.exports = {
// 企业标准
- enterpriseStandard: {
+ standard: {
allocationStandard: '配置标准',
shiftOutStandard: '移出标准',
initChange: '发起更改',
temporaryPermissionSet: '临时权限设置',
collection: '收藏',
cancelCollection: '取消收藏',
- templateExport: '企业标准模板'
+ templateExport: '企业标准模板',
+ pleaseSelectLeastOneNode: '请先选择二级及以下体系',
+ authorizationDepart: '授权部门',
+ authorizationUser: '授权人员',
+ maturityDate: '授权到期日期',
+ detailTitle: '企业标准详情页',
+ evaluate: '企标评价',
+ updateRecord: '更新记录',
+ submitQuestion: '提交问题',
+ standardResolutionSheet: '标准分解单'
+ },
+ // 宣贯
+ publicize: {
+ enterpriseStandardNum: '企标编号',
+ enterpriseStandardName: '企标名称',
+ publicizeData: '宣贯日期',
+ publicist: '宣贯人',
+ exportName: '企标宣贯表',
+ fileExportName: '企标宣贯表',
+ templateName: '企标宣贯模板',
+ releaseDate: '发布日期',
+ materialDate: '实施日期',
+ relatedMaterial: '相关材料'
}
}
diff --git a/src/components/menu/SideMenu.vue b/src/components/menu/SideMenu.vue
index 55302693..e585e37e 100644
--- a/src/components/menu/SideMenu.vue
+++ b/src/components/menu/SideMenu.vue
@@ -150,6 +150,10 @@ export default {
color: #D52C26;
}
+ /deep/ .anticon {
+ color: #D52C26;
+ }
+
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
diff --git a/src/mixins/ConfigurableTableMixin.js b/src/mixins/ConfigurableTableMixin.js
index 43172a5b..bf751063 100644
--- a/src/mixins/ConfigurableTableMixin.js
+++ b/src/mixins/ConfigurableTableMixin.js
@@ -111,7 +111,8 @@ export const ConfigurableTableMixin = {
const tempColumns = []
columns.forEach(item => {
// 可点击项加入插槽
- if (item.click === 'true') {
+ // 标准编号和标准名称可以跳转详情页
+ if (item.dbFieldName === 'standard_number' || item.dbFieldName === 'standard_name') {
item.scopedSlots = {
customRender: 'detailClick'
}
@@ -131,6 +132,7 @@ export const ConfigurableTableMixin = {
customRender: item.dbFieldName
}
}
+ console.log(item)
tempColumns.push(item)
})
if (this.showAction && this.operateColumn) {
@@ -142,6 +144,7 @@ export const ConfigurableTableMixin = {
operateColumn.width = width || 100
tempColumns.push(operateColumn)
}
+ console.log(tempColumns)
return tempColumns
},
/**
diff --git a/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue b/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue
new file mode 100644
index 00000000..ace49a91
--- /dev/null
+++ b/src/views/enterpriseStandardLibrary/publicize/EnterpriseStandardPublicize.vue
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('export') }}
+
+
{{ $t('exportWithFile') }}
+
+
+ {{ $t('templateDownload') }}
+
+
+
+
+
+
+
+
+
+ {{ text || text === 0 ? text : global.emptyLine }}
+ {{ text }}
+
+
+
+
+
+
+ {{ text || text === 0 ? text : global.emptyLine }}
+ {{ text }}
+
+
+
+
+
+
+ {{ text || text === 0 ? text : global.emptyLine }}
+ {{ text }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
index b6116825..a78d59ad 100644
--- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
+++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue
@@ -49,16 +49,16 @@
{{ $t('newlyAdded') }}
- {{ $t('import') }}
+ {{ $t('import') }}
-
{{ $t('export') }}
-
{{ $t('exportWithFile') }}
-
{{ $t('templateDownload') }}
-
{{ $t('batchDelete') }}
-
{{ $t('enterpriseStandardLibrary.enterpriseStandard.allocationStandard') }}
-
{{ $t('enterpriseStandardLibrary.enterpriseStandard.shiftOutStandard') }}
-
{{ $t('enterpriseStandardLibrary.enterpriseStandard.initChange') }}
-
{{ $t('enterpriseStandardLibrary.enterpriseStandard.temporaryPermissionSet') }}
+
{{ $t('export') }}
+
{{ $t('exportWithFile') }}
+
{{ $t('templateDownload') }}
+
{{ $t('batchDelete') }}
+
{{ $t('enterpriseStandardLibrary.standard.allocationStandard') }}
+
{{ $t('enterpriseStandardLibrary.standard.shiftOutStandard') }}
+
{{ $t('enterpriseStandardLibrary.standard.initChange') }}
+
{{ $t('enterpriseStandardLibrary.standard.temporaryPermissionSet') }}
+
+
+
@@ -120,12 +123,26 @@ import JTable from '@/components/jero/JTable'
// 搜索组件
import Search from '@/components/customField/Search'
import { ConfigurableTableMixin } from '@/mixins/ConfigurableTableMixin'
-import { getEnterpriseStandardTableHeader, getEnterpriseStandardSearchForm } from '@api/enterpriseStandardLibraryApi'
+import {
+ getTreeList,
+ getEnterpriseStandardTableHeader,
+ getEnterpriseStandardSearchForm,
+ allocationStandard,
+ shiftStandard,
+ initChange,
+ collectStandard,
+ shareStandard
+} from '@api/enterpriseStandardLibraryApi'
+// 添加、编辑弹框
import EnterpriseStandardModal from './modules/EnterpriseStandardModal'
+// 选择标准组件
+import StandardSelectionModal from '@/components/selection/StandardSelectionModal'
+// 临时权限设置
+import TemporaryPermissionSet from './modules/TemporaryPermissionSet'
export default {
name: 'EnterpriseStandardList',
- components: { EnterpriseStandardModal, JTable, Search },
+ components: { TemporaryPermissionSet, StandardSelectionModal, EnterpriseStandardModal, JTable, Search },
mixins: [ConfigurableTableMixin],
data () {
return {
@@ -139,7 +156,7 @@ export default {
mouseInNodeKey: null, // 鼠标悬浮的节点key值
operationList: [
{
- text: this.$t('enterpriseStandardLibrary.enterpriseStandard.collection'),
+ text: this.$t('enterpriseStandardLibrary.standard.collection'),
clickEvent: 'handleCollection',
has: 'enterpriseStandard:collection'
},
@@ -173,27 +190,13 @@ export default {
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'
- }
- ]
+ showAction: true // 是否显示操作列
}
},
methods: {
// 获取左侧树数据
initTreeData (params) {
- getWorkGroupTreeList(params).then(res => {
+ getTreeList(params).then(res => {
if (res.success) {
this.treeData = this.dealTreeData(res.result)
// this.treeData = res.result
@@ -262,19 +265,89 @@ export default {
},
// 配置标准
handleAllocationStandard () {
-
+ // 没选择左侧树节点,需要提示“请先选择二级及以下体系”
+ if (!this.currentTreeNode || this.currentTreeNode.length === 0) {
+ this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
+ return
+ }
+ this.$refs.standardSelectionModal.open()
+ },
+ // 配置标准确定
+ allocationStandardChange (dbFieldName, standardIds) {
+ this.loading = true
+ const params = {
+ nodeId: this.currentTreeNode[0],
+ standardIds
+ }
+ allocationStandard(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ this.modalFormOk()
+ } else {
+ this.$message.warn(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
},
// 移出标准
handleShiftOutStandard () {
-
+ // 没选择左侧树节点,需要提示“请先选择二级及以下体系”
+ if (!this.currentTreeNode || this.currentTreeNode.length === 0) {
+ this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
+ return
+ }
+ // 没有选择列表数据,需要提示“选中至少一条列表数据”
+ if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
+ this.$message.warning(this.$t('selectLeastOne'))
+ return
+ }
+ this.loading = true
+ const params = {
+ nodeId: this.currentTreeNode[0],
+ ids: this.selectedRowKeys.join(',')
+ }
+ shiftStandard(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ this.modalFormOk()
+ } else {
+ this.$message.warn(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
},
// 发起更改
handleInitChange () {
-
+ // 没有选择列表数据,需要提示“选中至少一条列表数据”
+ if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
+ this.$message.warning(this.$t('selectLeastOne'))
+ return
+ }
+ this.loading = true
+ const params = {
+ ids: this.selectedRowKeys.join(',')
+ }
+ initChange(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ this.modalFormOk()
+ } else {
+ this.$message.warn(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
},
// 临时权限设置
handleTemporaryPermissSet () {
-
+ // 没有选择列表数据,需要提示“选中至少一条列表数据”
+ if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
+ this.$message.warning(this.$t('selectLeastOne'))
+ return
+ }
+ this.$refs.temporaryPermissionSet.open(this.selectedRowKeys.join(','))
},
// 操作栏的点击
operationClick (operation, record) {
@@ -286,11 +359,36 @@ export default {
},
// 收藏
handleCollection (record) {
-
+ const params = {}
+ params.id = record.id
+ collectStandard(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ } else {
+ this.$message.warning(res.message)
+ }
+ })
},
// 分享
handleShare (record) {
-
+ const params = {}
+ params.id = record.id
+ shareStandard(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ } else {
+ this.$message.warning(res.message)
+ }
+ })
+ },
+ // 跳转详情
+ detailClick (record) {
+ this.$openPageNewSheet({
+ path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
+ query: {
+ id: record.id
+ }
+ })
}
}
}
diff --git a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
new file mode 100644
index 00000000..ccf98e0c
--- /dev/null
+++ b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
@@ -0,0 +1,133 @@
+
+
+
{{ pageTitle }}{{ $t('enterpriseStandardLibrary.standard.detailTitle') }}
+
+
+
{{ part }}
+
+
+
+
+ {{ $t('enterpriseStandardLibrary.standard.evaluate') }}
+
+
+
+
+
+
+
+ {{ $t('enterpriseStandardLibrary.standard.updateRecord') }}
+
+
+
+
+ {{ $t('enterpriseStandardLibrary.standard.submitQuestion') }}
+
+
+
+
+
+
+ {{ detailData[formItem.dbFieldName] }}
+
+
+
+
+
+
+
{{ formItem.dbFieldTxt }}
+
{{ $t('enterpriseStandardLibrary.standard.standardResolutionSheet') }}
+
+
+
+
+
{{ file.fileName }}
+
+
+
{{ $t('download') }}
+
+
+ {{ $t('unwatermarkedDownload') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue b/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
index 25d05042..f87a7ae5 100644
--- a/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
+++ b/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
@@ -60,6 +60,9 @@ export default {
},
edit (record) {
this.visible = true
+ this.$nextTick(() => {
+ this.$refs.addForm.edit(record)
+ })
},
handleOk () {
this.confirmLoading = true
diff --git a/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionSet.vue b/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionSet.vue
new file mode 100644
index 00000000..15df4b40
--- /dev/null
+++ b/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionSet.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+