[update] 企标库,添加权限

This commit is contained in:
lideqin
2023-09-13 16:55:20 +08:00
parent b27e38e087
commit 1c46cfbae4
9 changed files with 126 additions and 157 deletions
+3 -3
View File
@@ -30,8 +30,8 @@ const setQualityStandard = (params) => getAction('/enterprise/reviewMeeting/setQ
// 获取评分详情
const getScoreDetail = (params) => getAction('/enterprise/reviewMeeting/evaluateDetail/' + `${params.id}`, params)
// 企标稽查-延期稽查
const deferredCheck = (params) => getAction('', params)
// 企标稽查-获取延期稽查数据
const getDeferredCheck = (params) => getAction('/enterprise/inspect/delayInspect', params)
// 企标稽查-根据id获取稽查报告详情
const getCheckReportById = (params) => getAction('', params)
// 企标稽查-根据id获取整改计划
@@ -60,7 +60,7 @@ export {
setQualityStandard,
getScoreDetail,
deferredCheck,
getDeferredCheck,
getCheckReportById,
getRectificationPlanById,
-58
View File
@@ -190,64 +190,6 @@ export default {
mounted () {
this.getSysCategoryTree()
this.getSearch()
// this.searchList = [
// {
// dbFieldName: 'serial_number',
// dbFieldTxt: '编号',
// dict_field: '',
// fieldShowType: '1',
// tree: []
// },
// {
// dbFieldName: 'title',
// dbFieldTxt: '标题',
// dict_field: '',
// fieldShowType: '1',
// tree: []
// },
// {
// dbFieldName: 'state',
// dbFieldTxt: '状态',
// dict_field: 'state',
// fieldShowType: '3',
// tree: []
// },
// {
// dbFieldName: 'region',
// dbFieldTxt: '适用地区',
// dict_field: 'region',
// fieldShowType: '4',
// tree: []
// },
// {
// dbFieldName: 'technology_territory',
// dbFieldTxt: '技术领域',
// dict_field: 'technology_territory',
// fieldShowType: '0',
// tree: []
// },
// {
// dbFieldName: 'issue_time',
// dbFieldTxt: '发布日期',
// dict_field: '',
// fieldShowType: '5',
// tree: []
// },
// {
// dbFieldName: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
// dbFieldTxt: '新车型实施日期',
// dict_field: '',
// fieldShowType: '5',
// tree: []
// },
// {
// dbFieldName: 'implement_time',
// dbFieldTxt: '在产车实施日期',
// dict_field: '',
// fieldShowType: '5',
// tree: []
// }
// ]
},
methods: {
searchQuery () {
@@ -66,7 +66,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary:check:search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -77,15 +77,18 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 导出-->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('enterpriseStandardLibrary.check.exportFileName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:export'"
@click="handleExportXls($t('enterpriseStandardLibrary.check.exportFileName'))">
{{ $t('export') }}
</a-button>
<!-- 导出延期数据-->
<a-button icon="upload" type="primary" ghost @click="handleExportPostponeData($t('enterpriseStandardLibrary.check.exportPostponeDataName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:exportPostponeData'"
@click="handleExportPostponeData($t('enterpriseStandardLibrary.check.exportPostponeDataName'))">
{{ $t('enterpriseStandardLibrary.check.exportPostponeData') }}
</a-button>
<!-- 导出整改计划-->
<a-button icon="upload" type="primary" ghost @click="handleExportRectificationPlan($t('enterpriseStandardLibrary.check.exportRectificationPlanName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:exportRectificationPlan'"
@click="handleExportRectificationPlan($t('enterpriseStandardLibrary.check.exportRectificationPlanName'))">
{{ $t('enterpriseStandardLibrary.check.exportRectificationPlan') }}
</a-button>
</div>
@@ -122,9 +125,25 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
<a @click="handleDeferredCheck(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.deferredCheck') }}</a>
<a @click="handleCheckReport(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.checkReport') }}</a>
<a @click="handleRectificationPlan(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.rectificationPlan') }}</a>
<template v-if="record.delayFlag && isHasPermission(operationList[0].has)">
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
<a-divider type="vertical" />
<a-dropdown placement="bottomCenter">
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
<a-menu slot="overlay">
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
<a @click="operationClick(operation,record)">
<div class="operate-btn">
{{ operation.text }}
</div>
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</template>
<template v-else>
<a v-for="(operation, index) in operationList.splice(1)" :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
</template>
</div>
</j-table>
@@ -143,6 +162,7 @@ import '@assets/less/common.less'
import { queryDepartTreeList } from '@/api/api'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { downFile } from '@/api/manage'
import { isHasPermission } from '@/utils/hasPermission'
import JTable from '@/components/jero/JTable'
// 延期稽查弹框
import DeferredCheckModal from './modules/DeferredCheckModal'
@@ -157,6 +177,12 @@ export default {
data () {
return {
categoryTreeList: [], // 组织机构查询的组织机构树数据
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{
title: this.$t('serialNumber'),
@@ -186,7 +212,7 @@ export default {
title: this.$t('enterpriseStandardLibrary.check.planCheckTarget'),
align: 'center',
width: 180,
dataIndex: 'planCheckTarget',
dataIndex: 'planInspectObject',
scopedSlots: { customRender: 'text' }
},
{
@@ -263,13 +289,31 @@ export default {
list: '/enterprise/inspect/page',
exportPostponeDataUrl: '', // 导出延期数据
exportRectificationPlanUrl: '' // 导出整改计划
}
},
operationList: [
{
text: this.$t('enterpriseStandardLibrary.check.deferredCheck'),
clickEvent: 'handleDeferredCheck',
has: 'enterpriseStandardLibrary.check.deferredCheck'
},
{
text: this.$t('enterpriseStandardLibrary.check.checkReport'),
clickEvent: 'handleCheckReport',
has: 'enterpriseStandardLibrary.check.checkReport'
},
{
text: this.$t('enterpriseStandardLibrary.check.rectificationPlan'),
clickEvent: 'handleRectificationPlan',
has: 'enterpriseStandardLibrary.check.rectificationPlan'
}
]
}
},
mounted () {
this.getSysCategoryTree()
},
methods: {
isHasPermission,
// 获取组织机构树
getSysCategoryTree () {
queryDepartTreeList().then((res) => {
@@ -5,35 +5,23 @@
:width="800"
:closable="true"
@cancel="handleCancel"
@ok="handleOk"
:footer="true"
:visible="visible">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.check.applyPostponeDate')">
<a-date-picker
v-decorator.trim="[ 'applyPostponeDate', validatorRules.applyPostponeDate]"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
>
</a-date-picker>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.check.postponement')">
<a-textarea
v-decorator.trim="[ 'postponement', validatorRules.postponement]"
:placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.check.postponement')"
:maxLength="500"
:rows="4" />
</a-form-item>
</a-form>
<template v-if="content">
<a-row v-for="item in content" :key="item.label" :gutter="24" class="content-row">
<a-col :span="6" :offset="2">{{ item.label }}</a-col>
<a-col :span="14">{{ item.value }}</a-col>
</a-row>
</template>
</a-spin>
</a-modal>
</template>
<script>
import pick from 'lodash.pick'
import { deferredCheck } from '@/api/enterpriseStandardLibraryApi'
import { getDeferredCheck } from '@/api/enterpriseStandardLibraryApi'
export default {
name: 'DeferredCheckModal',
@@ -42,62 +30,38 @@ export default {
title: this.$t('enterpriseStandardLibrary.check.deferredCheck'),
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
validatorRules: {
applyPostponeDate: {
rules: [
{ required: false, message: this.$t('pleaseSelect') + this.$t('enterpriseStandardLibrary.check.applyPostponeDate') }
],
validateTrigger: 'change'
},
postponement: {
rules: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('enterpriseStandardLibrary.check.postponement') }
],
validateTrigger: 'blur'
}
}
content: {}
}
},
methods: {
open (record) {
this.visible = true
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'applyPostponeDate', 'postponement'))
this.initData()
},
initData () {
this.confirmLoading = true
getDeferredCheck({ id: this.model.id }).then(res => {
if (res.success) {
this.content.requestDelayDate = {
label: this.$t('enterpriseStandardLibrary.check.applyPostponeDate'),
value: res.result.requestDelayDate
}
this.content.delayDescprtion = {
label: this.$t('enterpriseStandardLibrary.check.postponement'),
value: res.result.delayDescprtion
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
},
handleCancel () {
this.close()
},
handleOk () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
deferredCheck(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.close()
} else {
this.$message.warning(res.message)
}
})
}
})
},
close () {
this.model = {}
this.visible = false
@@ -106,6 +70,9 @@ export default {
}
</script>
<style scoped>
<style scoped lang="less">
.content-row {
height: 30px;
line-height: 30px;
}
</style>
@@ -118,7 +118,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary:plan:search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -129,7 +129,8 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 导出-->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('enterpriseStandardLibrary.plan.exportFileName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:plan:export'"
@click="handleExportXls($t('enterpriseStandardLibrary.plan.exportFileName'))">
{{ $t('export') }}
</a-button>
</div>
@@ -174,8 +175,8 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
<a @click="handleDetail(record)" class="table-ope-btn">{{ $t('view') }}</a>
<a @click="handleDelete(record.id)" class="table-ope-btn">{{ $t('delete') }}</a>
<a @click="handleDetail(record)" class="table-ope-btn" v-has="'enterpriseStandardLibrary:plan:detail'">{{ $t('view') }}</a>
<a @click="handleDelete(record.id)" class="table-ope-btn" v-has="'enterpriseStandardLibrary:plan:delete'">{{ $t('delete') }}</a>
</div>
</j-table>
@@ -196,6 +197,12 @@ export default {
data () {
return {
categoryTreeList: [], // 组织机构下拉框数据
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
@@ -37,7 +37,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary:publicize:search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -47,12 +47,15 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 导出-->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('enterpriseStandardLibrary.publicize.exportName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:publicize:export'"
@click="handleExportXls($t('enterpriseStandardLibrary.publicize.exportName'))">
{{ $t('export') }}
</a-button>
<a-button icon="upload" type="primary" ghost @click="handleFileExport($t('enterpriseStandardLibrary.publicize.fileExportName'))">{{ $t('exportWithFile') }}</a-button>
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:publicize:fileExport'"
@click="handleFileExport($t('enterpriseStandardLibrary.publicize.fileExportName'))">{{ $t('exportWithFile') }}</a-button>
<!-- 模板下载-->
<a-button type="primary" icon="download" ghost @click="downTemplate('enterpriseStandardLibrary.publicize.templateName')">
<a-button type="primary" icon="download" ghost v-has="'enterpriseStandardLibrary:publicize:templateDownload'"
@click="downTemplate('enterpriseStandardLibrary.publicize.templateName')">
{{ $t('templateDownload') }}
</a-button>
</div>
@@ -90,8 +93,8 @@
<!-- 相关材料 -->
<template v-slot:relatedMaterial="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="handleRelatedMaterialClick(record)">{{ text }}</a>
<template slot="title">{{ record.declareFileName || record.declareFileName === 0 ? record.declareFileName : global.emptyLine }}</template>
<a class="link-a" @click="handleRelatedMaterialClick(record)">{{ record.declareFileName }}</a>
</a-tooltip>
</template>
@@ -172,7 +175,6 @@ export default {
title: this.$t('enterpriseStandardLibrary.publicize.relatedMaterial'),
align: 'center',
width: 180,
dataIndex: 'declareFileName',
scopedSlots: { customRender: 'relatedMaterial' }
}
],
@@ -26,7 +26,7 @@
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" v-has="'enterpriseStandardLibrary:reviewMeeting:search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -37,7 +37,7 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 设置优质标准-->
<a-button icon="setting" type="primary" ghost @click="handleSetGood">
<a-button icon="setting" type="primary" ghost @click="handleSetGood" v-has="'enterpriseStandardLibrary:reviewMeeting:setQualityStandard'">
{{ $t('enterpriseStandardLibrary.reviewMeeting.setQualityStandard') }}
</a-button>
</div>
@@ -66,7 +66,8 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
<a @click="handleReviewDetail(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.reviewMeeting.reviewDetail') }}</a>
<a @click="handleReviewDetail(record)" class="table-ope-btn" v-has="'enterpriseStandardLibrary:reviewMeeting:reviewDetail'"
>{{ $t('enterpriseStandardLibrary.reviewMeeting.reviewDetail') }}</a>
</div>
</j-table>
@@ -42,7 +42,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary.reviewPlan.search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -53,7 +53,8 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 发起复审 -->
<a-button icon="plus" type="primary" ghost @click="handleInitReview">
<a-button icon="plus" type="primary" ghost v-has="'enterpriseStandardLibrary.reviewPlan.initReview'"
@click="handleInitReview">
{{ $t('enterpriseStandardLibrary.reviewPlan.initReview') }}
</a-button>
</div>
@@ -165,6 +166,12 @@ export default {
scopedSlots: { customRender: 'text' }
}
],
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
url: {
list: '/enterprise/recheckPlan/page'
}
@@ -1,12 +1,8 @@
<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="handleTreeSearch" />
<!--:expanded-keys="expandedKeys"-->
<!--:auto-expand-parent="autoExpandParent"-->
<!--@expand="treeExpand"-->
<a-tree
v-if="treeData.length > 0"
:show-line="true"
@@ -32,14 +28,17 @@
</a-tooltip>
<template v-if="record.key === mouseInNodeKey && record.nodeType !== StandardSystemTreeNodeType.NOT_OPERATE_NODE.value">
<!-- 新增-->
<a-button icon="plus" class="tree-operate-node-btn" @click="handleTreeAdd(record)"></a-button>
<a-button icon="plus" class="tree-operate-node-btn" v-has="'enterpriseStandard:tree:add'"
@click="handleTreeAdd(record)"></a-button>
<!-- 编辑-->
<a-button v-if="record.nodeType !== StandardSystemTreeNodeType.ROOT_NODE.value"
v-has="'enterpriseStandard:tree:edit'"
class="tree-operate-node-btn" @click="handleTreeEdit(record)">
<i class="iconfont icon-bianji" style="color: #D52C26"></i>
</a-button>
<!-- 删除-->
<a-button v-if="record.nodeType !== StandardSystemTreeNodeType.ROOT_NODE.value"
v-has="'enterpriseStandard:tree:delete'"
class="tree-operate-node-btn" @click="handleTreeDelete(record.id)">
<i class="iconfont icon-shanchu_" style="color: #D52C26"></i>
</a-button>