企标稽查流程
This commit is contained in:
@@ -243,5 +243,34 @@ module.exports = {
|
||||
solicitOpinionObject: '征求意见对象',
|
||||
isCountersign: '是否会签',
|
||||
countersignRelevantPersonnel: '会签相关人员'
|
||||
},
|
||||
// 企标稽查流程
|
||||
esInspectionProcess: {
|
||||
inspectionPlanEs: '稽查计划企标',
|
||||
esNumber: '企标编号',
|
||||
esName: '企标名称',
|
||||
inspectionContent: '稽查内容',
|
||||
accordingToTerms: '依据条款',
|
||||
standardContentOrDemand: '标准内容或要求',
|
||||
opinion: '意见',
|
||||
sectionNumber: '章节编号',
|
||||
inspectionReport: '稽查报告',
|
||||
rectificationPlan: '整改计划',
|
||||
actualInspectionCompletionDate: '实际稽查完成日期',
|
||||
actualInspector: '实际稽查人',
|
||||
implementation: '执行情况',
|
||||
file: '附件',
|
||||
score: '评分',
|
||||
enterpriseStandard: '企标:',
|
||||
sectionClause: '章节条款',
|
||||
isNeedRectification: '是否需要整改',
|
||||
nonCompliantDescription: '不符合项描述',
|
||||
rectificationMeasures: '整改措施',
|
||||
rectificationUnit: '整改单位',
|
||||
rectificationDirector: '整改负责人',
|
||||
planDoneDate: '计划完成日期',
|
||||
rectificationPlanDoneDate: '整改计划完成日期',
|
||||
rectificationRealityDoneDate: '整改实际完成日期',
|
||||
rectificationStatus: '整改状态'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,5 +260,34 @@ module.exports = {
|
||||
solicitOpinionObject: '征求意见对象',
|
||||
isCountersign: '是否会签',
|
||||
countersignRelevantPersonnel: '会签相关人员'
|
||||
},
|
||||
// 企标稽查流程
|
||||
esInspectionProcess: {
|
||||
inspectionPlanEs: '稽查计划企标',
|
||||
esNumber: '企标编号',
|
||||
esName: '企标名称',
|
||||
inspectionContent: '稽查内容',
|
||||
accordingToTerms: '依据条款',
|
||||
standardContentOrDemand: '标准内容或要求',
|
||||
opinion: '意见',
|
||||
sectionNumber: '章节编号',
|
||||
inspectionReport: '稽查报告',
|
||||
rectificationPlan: '整改计划',
|
||||
actualInspectionCompletionDate: '实际稽查完成日期',
|
||||
actualInspector: '实际稽查人',
|
||||
implementation: '执行情况',
|
||||
file: '附件',
|
||||
score: '评分',
|
||||
enterpriseStandard: '企标:',
|
||||
sectionClause: '章节条款',
|
||||
isNeedRectification: '是否需要整改',
|
||||
nonCompliantDescription: '不符合项描述',
|
||||
rectificationMeasures: '整改措施',
|
||||
rectificationUnit: '整改单位',
|
||||
rectificationDirector: '整改负责人',
|
||||
planDoneDate: '计划完成日期',
|
||||
rectificationPlanDoneDate: '整改计划完成日期',
|
||||
rectificationRealityDoneDate: '整改实际完成日期',
|
||||
rectificationStatus: '整改状态'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
},
|
||||
{ // 企标稽查流程
|
||||
title: this.$t('workCenter.newProcess.processOfEnterpriseStandardAudit'),
|
||||
path: ''
|
||||
path: '/workCenter/EnterpriseStandardInspectionProcess'
|
||||
},
|
||||
{ // 稽查延期申请流程
|
||||
title: this.$t('workCenter.newProcess.auditExtensionApplicationProcess'),
|
||||
|
||||
+241
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
||||
<!-- 标题右侧tab -->
|
||||
<template v-slot:titleRightCustom>
|
||||
<div class="table-operator-tab">
|
||||
<!-- 基础信息 -->
|
||||
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
|
||||
@click="switchChange('base')">{{ $t('basicInformation') }}
|
||||
</a>
|
||||
<!-- 人员信息 -->
|
||||
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
|
||||
@click="switchChange('user')">{{ $t('personalInformation') }}
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--基本信息-->
|
||||
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
|
||||
<!-- 流程信息 -->
|
||||
<div class="process-part-title">{{ $t('processInformation') }}</div>
|
||||
<a-form :form="processInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<!-- 流程名称 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
:disabled="disabled || processDisabled"
|
||||
:maxLength="50"
|
||||
v-decorator="['processName', validatorRules.processName]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<!-- 截止日期 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
|
||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||
style="width: 100%"
|
||||
:disabled="disabled || processDisabled"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-decorator="['expirationDate']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- 流程说明 -->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
:disabled="disabled || processDisabled"
|
||||
v-decorator="['processExplain']" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
<!-- 业务基本信息 -->
|
||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||
<!-- 流程表格 -->
|
||||
<inspection-process-table :current-node="currentNode" />
|
||||
|
||||
<!-- 流程审批信息 -->
|
||||
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
|
||||
<a-form :form="approvalInfoForm">
|
||||
<!--备注-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
v-decorator="['remarks', validatorRules.remarks]" />
|
||||
</a-form-item>
|
||||
<!--附件-->
|
||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
|
||||
<j-upload v-decorator="['file']" return-id />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- 人员信息 -->
|
||||
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list :url="url">
|
||||
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<a-button type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
|
||||
</div>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import InternalDetailPage from '@comp/InternalDetailPage'
|
||||
import ProcessDetailList from '@comp/ProcessDetailList'
|
||||
import PersonnelInfo from '@comp/PersonnelInfo'
|
||||
import InspectionProcessTable
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
|
||||
|
||||
// 标准立项的人员信息
|
||||
const approvalPersonalInfo = [ // 人员信息的数据
|
||||
{
|
||||
id: 1,
|
||||
nodeName: '稽查负责人发起计划',
|
||||
nodeRoleName: '稽查负责人',
|
||||
canChoose: false,
|
||||
userList: `系统管理员`
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
nodeName: '负责人主管级领导审批',
|
||||
nodeRoleName: '负责人主管级领导',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
// chooseSource: 'contactManage',
|
||||
fieldName: 'contactUser'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
nodeName: '稽查负责人上传稽查报告和整改计划',
|
||||
nodeRoleName: '稽查负责人',
|
||||
canChoose: false,
|
||||
chooseType: 'checkbox',
|
||||
// chooseSource: 'contactManage',
|
||||
fieldName: 'contactUser'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
nodeName: '负责人主管级领导审批',
|
||||
nodeRoleName: '负责人主管级领导',
|
||||
canChoose: false,
|
||||
chooseType: 'radio',
|
||||
// chooseSource: 'contactManage',
|
||||
fieldName: 'contactUser'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
nodeName: '相关人员会签',
|
||||
nodeRoleName: '相关人员',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
// chooseSource: 'contactManage',
|
||||
fieldName: 'contactUser'
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardInspectionProcess',
|
||||
components: { InspectionProcessTable, PersonnelInfo, ProcessDetailList, InternalDetailPage },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
switchValue: 'base',
|
||||
disabled: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 20 }
|
||||
},
|
||||
longLabelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 2 }
|
||||
},
|
||||
longWrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
},
|
||||
currentNode: '5',
|
||||
personnelInfoData: [], // 人员信息数据
|
||||
validatorRules: {
|
||||
// 流程名称
|
||||
processName: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 备注
|
||||
remarks: {
|
||||
rules: [
|
||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
countersignForm: this.$form.createForm(this),
|
||||
approvalInfoForm: this.$form.createForm(this),
|
||||
// 是否会签
|
||||
isCountersign: null,
|
||||
url: {
|
||||
list: '' // 人员信息右侧表的分页查询接口
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return this.$t('flowCenter') + this.$route.meta.title
|
||||
},
|
||||
processDisabled () {
|
||||
return +this.currentNode > 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
},
|
||||
handleSave () {
|
||||
// if (this.loading) return
|
||||
|
||||
},
|
||||
handleSubmit () {
|
||||
if (this.loading) return
|
||||
this.currentNode = +this.currentNode + 1 + ''
|
||||
},
|
||||
handleAgree () {
|
||||
if (this.loading) return
|
||||
this.currentNode = +this.currentNode + 1 + ''
|
||||
},
|
||||
// 是否会签改变
|
||||
changeIsCountersign (val) {
|
||||
if (val === '1') {
|
||||
this.isCountersign = true
|
||||
} else if (val === '2') {
|
||||
this.isCountersign = false
|
||||
} else {
|
||||
this.isCountersign = null
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.personnelInfoData = approvalPersonalInfo
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<div class="table-operator" v-if="!disabled">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
|
||||
<!-- 企标号、企标名称 -->
|
||||
<template v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template slot="action" slot-scope="{text, record, index}">
|
||||
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</a-spin>
|
||||
<!-- 新增编辑稽查内容 -->
|
||||
<inspection-process-content-modal ref="inspectionProcessContentModal" @ok="modalFormOk"/>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import InspectionProcessContentModal
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContentModal'
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessContent',
|
||||
mixins: [JeroListMixin],
|
||||
components: { InspectionProcessContentModal, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const columns = [
|
||||
{ // 依据条款
|
||||
title: this.$t('workCenter.esInspectionProcess.accordingToTerms'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'planInspectionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 标准内容或要求
|
||||
title: this.$t('workCenter.esInspectionProcess.standardContentOrDemand'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'inspectionDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
// 操作
|
||||
fixed: 'right',
|
||||
title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
return {
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionContent'),
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
dataSource: [{}],
|
||||
columns: columns.slice(0, this.disabled ? 2 : 3)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
},
|
||||
handleAdd () {
|
||||
this.$refs.inspectionProcessContentModal.title = this.$t('add') + this.$t('workCenter.esInspectionProcess.opinion')
|
||||
this.$refs.inspectionProcessContentModal.add()
|
||||
},
|
||||
handleEdit (record, index) {
|
||||
const { file } = record
|
||||
this.$refs.inspectionProcessContentModal.title = this.$t('edit') + this.$t('workCenter.esInspectionProcess.opinion')
|
||||
this.$refs.inspectionProcessContentModal.edit(file, record, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:maskClosable="true"
|
||||
:width="500"
|
||||
:closable="true"
|
||||
@cancel="handleCancel"
|
||||
fullscreen
|
||||
:visible="visible">
|
||||
<div class="content">
|
||||
<!-- 左侧文件预览 -->
|
||||
<div class="content-left">
|
||||
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
|
||||
<a-empty class="empty-file" v-else description="当前文件类型暂不支持预览"></a-empty>
|
||||
</div>
|
||||
<!-- 右侧表单区域 -->
|
||||
<div class="content-right">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!-- 章节编号 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionProcess.sectionNumber')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.sectionNumber')"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
v-decorator.trim="[ 'sectionNumber', validatorRules.sectionNumber ]" />
|
||||
</a-form-item>
|
||||
<!-- 标准内容或要求 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.standardContentOrDemand')"
|
||||
:maxLength="50"
|
||||
@change="event => event.target.value = event.target.value.trim()"
|
||||
v-decorator.trim="[ 'standardContentOrDemand', validatorRules.standardContentOrDemand ]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<template slot="footer">
|
||||
<a-button :loading="confirmLoading" @click="handleCancel">
|
||||
{{ $t('cancel') }}
|
||||
</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleSubmitAddAdd">
|
||||
{{ $t('submitAddAdd') }}
|
||||
</a-button>
|
||||
<a-button type="primary" :loading="confirmLoading" @click="handleOk">
|
||||
{{ $t('submit') }}
|
||||
</a-button>
|
||||
</template>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import { getFileInfo } from '@/api/api'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessContentModal',
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
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: {
|
||||
// 章节编号
|
||||
sectionNumber: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.sectionNumber') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
// 标准内容或要求
|
||||
standardContentOrDemand: {
|
||||
rules: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.standardContentOrDemand') }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
index: undefined, // 编辑的表格的下标
|
||||
iframeSrc: '' // 左侧预览的路径
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add (file) {
|
||||
this.getFileInfo(file).then(res => {
|
||||
this.handlePreview(res)
|
||||
})
|
||||
this.visible = true
|
||||
this.form.resetFields()
|
||||
},
|
||||
edit (file, record, index) {
|
||||
this.getFileInfo(file).then(res => {
|
||||
this.handlePreview(res)
|
||||
})
|
||||
this.visible = true
|
||||
this.index = index
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'sectionNumber', 'standardContentOrDemand'))
|
||||
})
|
||||
},
|
||||
getFileInfo (fileId) {
|
||||
return new Promise(resolve => {
|
||||
let fileInfo
|
||||
getFileInfo({ id: fileId }).then(res => {
|
||||
if (res.success) {
|
||||
fileInfo = res.result
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(fileInfo)
|
||||
})
|
||||
})
|
||||
},
|
||||
handlePreview (file) {
|
||||
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1].toLowerCase() : ''
|
||||
if (fileSuffix === 'pdf') {
|
||||
// pdf预览
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
}
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
this.model = {}
|
||||
this.index = undefined
|
||||
this.iframeSrc = ''
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
// 提交并新增
|
||||
handleSubmitAddAdd () {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, values)
|
||||
console.log(param)
|
||||
this.$emit('ok', param, this.index)
|
||||
this.form.resetFields()
|
||||
this.model = {}
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOk () {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, values)
|
||||
console.log(param)
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.content-left {
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
iframe {
|
||||
height: calc(100% - 20px) !important;
|
||||
}
|
||||
}
|
||||
.content-right {
|
||||
width: 40%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-file {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<p>
|
||||
{{ $t('workCenter.esInspectionProcess.enterpriseStandard') }}
|
||||
{{model.inspectNo}}
|
||||
{{model.inspectName}}
|
||||
</p>
|
||||
<div class="table-operator" v-if="!disabled">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
|
||||
<!-- 企标号、企标名称 -->
|
||||
<template v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template slot="action" slot-scope="{text, record, index}">
|
||||
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</a-spin>
|
||||
<!-- 新增、编辑整改计划 -->
|
||||
<inspection-process-rectification-plan-modal ref="modalForm" @ok="modalFormOk"/>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import InspectionProcessRectificationPlanModal
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlanModal'
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessRectificationPlan',
|
||||
mixins: [JeroListMixin],
|
||||
components: { InspectionProcessRectificationPlanModal, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const columns = [
|
||||
{ // 不符合项描述
|
||||
title: this.$t('workCenter.esInspectionProcess.nonCompliantDescription'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'nonCompliantDescription',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改措施
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationMeasures'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'rectificationMeasures',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改负责人
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationDirector'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'rectificationDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改计划完成时间
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationPlanDoneDate'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'rectificationPlanDoneDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改实际完成时间
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationRealityDoneDate'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'rectificationRealityDoneDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改状态
|
||||
title: this.$t('workCenter.esInspectionProcess.rectificationStatus'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'rectificationStatus',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
// 操作
|
||||
fixed: 'right',
|
||||
title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
return {
|
||||
disableMixinCreated: true,
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionReport'),
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
dataSource: [{}],
|
||||
columns: columns.slice(0, this.disabled ? 6 : 7)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
+271
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="form" :model="form" :rules="rules">
|
||||
<!-- 章节条款 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="sectionClause"
|
||||
:label="$t('workCenter.esInspectionProcess.sectionClause')">
|
||||
<a-select v-model="form.sectionClause"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.sectionClause')"
|
||||
show-search
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<!-- 标准内容或要求 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="standardContentOrDemand"
|
||||
:label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
|
||||
<a-input :max-length="50" v-model="form.standardContentOrDemand" disabled class="readonly-transparent" />
|
||||
</a-form-model-item>
|
||||
<!-- 执行情况 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="implementation"
|
||||
:label="$t('workCenter.esInspectionProcess.implementation')">
|
||||
<a-input :max-length="50" v-model="form.implementation" disabled
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.implementation')" />
|
||||
</a-form-model-item>
|
||||
<!-- 附件 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.file')"
|
||||
prop="file">
|
||||
<a-input :max-length="50" v-model="form.file" disabled class="readonly-transparent" />
|
||||
</a-form-model-item>
|
||||
<!-- 评分 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.score')"
|
||||
prop="score">
|
||||
<a-input-number v-model="form.score" :min="1" :max="200" disabled
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
<!-- 是否需要整改 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.isNeedRectification')"
|
||||
prop="isNeedRectification">
|
||||
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.isNeedRectification')"
|
||||
type="radio"
|
||||
dictCode="yn"
|
||||
@change="changeIsNeedRectification"
|
||||
v-model="form.isNeedRectification" />
|
||||
</a-form-model-item>
|
||||
<!-- 不符合项描述 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.nonCompliantDescription')"
|
||||
prop="nonCompliantDescription">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.nonCompliantDescription')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
v-model="form.nonCompliantDescription"/>
|
||||
</a-form-model-item>
|
||||
<template v-if="isNeedRectification">
|
||||
<!-- 整改措施 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.rectificationMeasures')"
|
||||
prop="rectificationMeasures">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.rectificationMeasures')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
v-model="form.rectificationMeasures"/>
|
||||
</a-form-model-item>
|
||||
<!-- 整改单位 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.rectificationUnit')"
|
||||
prop="rectificationUnit">
|
||||
<j-select-depart :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.rectificationUnit')"
|
||||
v-model="form.rectificationUnit" />
|
||||
</a-form-model-item>
|
||||
<!-- 整改负责人 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.rectificationDirector')"
|
||||
prop="rectificationDirector">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.rectificationDirector')"
|
||||
type="radio" v-model="form.rectificationDirector"/>
|
||||
</a-form-model-item>
|
||||
<!-- 计划完成日期 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.planDoneDate')"
|
||||
prop="planDoneDate">
|
||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.planDoneDate')"
|
||||
v-model="form.planDoneDate" />
|
||||
</a-form-model-item>
|
||||
</template>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import UploadFile from '@comp/UploadFile'
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
export default {
|
||||
name: 'InspectionProcessRectificationPlanModal',
|
||||
components: { UserSelection, UploadFile },
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionPlanEs'),
|
||||
drawerWidth: 600,
|
||||
visible: false,
|
||||
form: {},
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
// 章节条款下拉
|
||||
sectionClauseList: [],
|
||||
// 是否需要整改(布尔值或null)
|
||||
isNeedRectification: null,
|
||||
rules: {
|
||||
// 是否需要整改
|
||||
isNeedRectification: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.isNeedRectification'), trigger: 'change' }
|
||||
],
|
||||
// 不符合项描述
|
||||
nonCompliantDescription: [
|
||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.nonCompliantDescription'), trigger: 'blur' }
|
||||
],
|
||||
// 整改措施
|
||||
rectificationMeasures: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.rectificationMeasures'), trigger: 'blur' }
|
||||
],
|
||||
// 整改单位
|
||||
rectificationUnit: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.rectificationUnit'), trigger: 'change' }
|
||||
],
|
||||
// 整改负责人
|
||||
rectificationDirector: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.rectificationDirector'), trigger: 'change' }
|
||||
],
|
||||
// 计划完成日期
|
||||
planDoneDate: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.planDoneDate'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 是否需要整改 改变时,修改 不符合项描述 必填状态
|
||||
isNeedRectification (val) {
|
||||
this.rules.nonCompliantDescription[0].required = val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
this.form = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
this.$refs.form.validate((err, value) => {
|
||||
console.log(err, value)
|
||||
})
|
||||
// this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
filterOption (input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
this.$refs.uploadFile.open(item.fileId)
|
||||
// this.uploadName = item.dbFieldName
|
||||
},
|
||||
// 修改事件:是否需要整改
|
||||
changeIsNeedRectification (val) {
|
||||
if (val === '1') {
|
||||
this.isNeedRectification = true
|
||||
} else if (val === '2') {
|
||||
this.isNeedRectification = false
|
||||
} else {
|
||||
this.isNeedRectification = null
|
||||
}
|
||||
},
|
||||
// 文件上传改变后的回调
|
||||
uploadFileChange (data) {
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.file = attIdList.join(',')
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 无边框无背景
|
||||
.readonly-transparent {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
&:hover {
|
||||
cursor: default;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<p>
|
||||
{{ $t('workCenter.esInspectionProcess.enterpriseStandard') }}
|
||||
{{model.inspectNo}}
|
||||
{{model.inspectName}}
|
||||
</p>
|
||||
<div class="table-operator" v-if="!disabled">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
|
||||
<!-- 企标号、企标名称 -->
|
||||
<template v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template slot="action" slot-scope="{text, record, index}">
|
||||
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</a-spin>
|
||||
<!-- 新增、编辑稽查报告 -->
|
||||
<inspection-process-report-modal ref="modalForm" @ok="modalFormOk"/>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import InspectionProcessReportModal
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReportModal'
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessReport',
|
||||
mixins: [JeroListMixin],
|
||||
components: { InspectionProcessReportModal, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const columns = [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 依据条款
|
||||
title: this.$t('workCenter.esInspectionProcess.accordingToTerms'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 标准内容或要求
|
||||
title: this.$t('workCenter.esInspectionProcess.standardContentOrDemand'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 执行情况
|
||||
title: this.$t('workCenter.esInspectionProcess.implementation'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'implementation',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 附件
|
||||
title: this.$t('workCenter.esInspectionProcess.file'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'file',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 评分
|
||||
title: this.$t('workCenter.esInspectionProcess.score'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'score',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
// 操作
|
||||
fixed: 'right',
|
||||
title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
return {
|
||||
disableMixinCreated: true,
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionReport'),
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
dataSource: [{}],
|
||||
columns: columns.slice(0, this.disabled ? 6 : 7)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="form" :model="form" :rules="rules">
|
||||
<!-- 章节条款 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="sectionClause"
|
||||
:label="$t('workCenter.esInspectionProcess.sectionClause')">
|
||||
<a-select v-model="form.sectionClause"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.sectionClause')"
|
||||
show-search
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<!-- 标准内容或要求 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="standardContentOrDemand"
|
||||
:label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
|
||||
<a-input :max-length="50" v-model="form.standardContentOrDemand" disabled class="readonly-transparent" />
|
||||
</a-form-model-item>
|
||||
<!-- 执行情况 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="implementation"
|
||||
:label="$t('workCenter.esInspectionProcess.implementation')">
|
||||
<a-input :max-length="50" v-model="form.implementation"
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.implementation')" />
|
||||
</a-form-model-item>
|
||||
<!-- 附件 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.file')"
|
||||
prop="file">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload">
|
||||
{{
|
||||
(form.file === 'null' || form.file === '' || form.file === null || form.file === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
<!-- 评分 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('workCenter.esInspectionProcess.score')"
|
||||
prop="score">
|
||||
<a-input-number v-model="form.score" :min="1" :max="200"
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
|
||||
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UploadFile from '@comp/UploadFile'
|
||||
export default {
|
||||
name: 'InspectionProcessReportModal',
|
||||
components: { UploadFile },
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionPlanEs'),
|
||||
drawerWidth: 600,
|
||||
visible: false,
|
||||
form: {},
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
// 章节条款下拉
|
||||
sectionClauseList: [],
|
||||
rules: {
|
||||
implementation: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.implementation'), trigger: 'blur' }
|
||||
],
|
||||
score: [
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.score'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
this.form = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
this.$refs.form.validate((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
// this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
filterOption (input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
this.$refs.uploadFile.open(item.fileId)
|
||||
// this.uploadName = item.dbFieldName
|
||||
},
|
||||
// 文件上传改变后的回调
|
||||
uploadFileChange (data) {
|
||||
const attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.file = attIdList.join(',')
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 无边框无背景
|
||||
.readonly-transparent {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="table-operator" v-if="['1'].includes(currentNode)">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
</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 v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<!-- 实际稽查完成日期 -->
|
||||
<template v-slot:actualInspectionCompletionDate="{text, record}">
|
||||
<div class="table-form" v-if="currentNode === '3'">
|
||||
<j-date v-model="record.actualInspectionCompletionDate" :placeholder="$t('pleaseSelect')+$t('date')" showType="day"
|
||||
style="width: 100%" :getCalendarContainer="(el) => getNumParentNode(el, 5)"></j-date>
|
||||
</div>
|
||||
<a-tooltip v-else overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text" v-if="text || text === 0">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 实际稽查人 -->
|
||||
<template v-slot:actualInspector="{text, record}">
|
||||
<div class="table-form" v-if="currentNode === '3'">
|
||||
<a-select v-model="record.actualInspector" style="width: 100%"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')">
|
||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<a-tooltip v-else overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text" v-if="text || text === 0">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template slot="action" slot-scope="{text, record, index}">
|
||||
<!-- 节点1显示稽查内容和删除、节点2显示稽查内容(只读) -->
|
||||
<template v-if="['1', '2'].includes(currentNode)">
|
||||
<a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.num || 0}${$t('strip')})` }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a v-if="currentNode === '1'" @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
<!-- 后续节点都显示稽查报告和整改计划 -->
|
||||
<template v-else>
|
||||
<a @click="handleInspectionReport(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionReport') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleRectificationPlan(record, index)" >{{ $t('workCenter.esInspectionProcess.rectificationPlan') }}</a>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
<!-- 添加稽查计划 -->
|
||||
<inspection-process-table-modal ref="inspectionProcessTableModal" @ok="modalFormOk"/>
|
||||
<!-- 稽查内容:节点2只查看,后续不显示 -->
|
||||
<inspection-process-content ref="inspectionProcessContent" @ok="modalFormOk" :disabled="['2'].includes(currentNode)"/>
|
||||
<!-- 稽查报告:节点3填写,后续只查看 -->
|
||||
<inspection-process-report ref="inspectionProcessReport" @ok="modalFormOk" :disabled="['4', '5'].includes(currentNode)"/>
|
||||
<!-- 整改计划:节点3填写,后续只查看 -->
|
||||
<inspection-process-rectification-plan ref="inspectionProcessRectificationPlan" @ok="modalFormOk" :disabled="['4', '5'].includes(currentNode)"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import InspectionProcessTableModal
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTableModal'
|
||||
import InspectionProcessContent
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessContent'
|
||||
import { getUserList } from '@api/api'
|
||||
import InspectionProcessReport
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReport'
|
||||
import InspectionProcessRectificationPlan
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlan'
|
||||
export default {
|
||||
name: 'InspectionProcessTable',
|
||||
components: { InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
// 当前节点
|
||||
currentNode: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
model: {},
|
||||
userList: [],
|
||||
dataSource: [
|
||||
{
|
||||
id: 1,
|
||||
inspectionBasisStandardName: '123',
|
||||
inspectionBasisStandardNumber: '123',
|
||||
detailFlag: true,
|
||||
departOpinion: '123',
|
||||
mainDutyStandardizationGroup: '1699358097292472322'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
inspectionBasisStandardName: 'qaaa',
|
||||
inspectionBasisStandardNumber: '12asdasdas3',
|
||||
detailFlag: true,
|
||||
departOpinion: '123',
|
||||
opinion: [],
|
||||
mainDutyStandardizationGroup: '1699358097292472322'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
inspectionBasisStandardName: '123',
|
||||
inspectionBasisStandardNumber: '123',
|
||||
detailFlag: true,
|
||||
departOpinion: '123',
|
||||
userId: 'e9ca23d68d884d4ebb19d07889727dae'
|
||||
// mainDutyStandardizationGroup: '1699358097292472322'
|
||||
}
|
||||
],
|
||||
allColumns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 稽查依据标准号
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardNumber',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 稽查依据标准名称
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardName',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 计划稽查对象
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionObjects',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主责标准化工作组
|
||||
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
dataIndex: 'mainDutyStandardizationGroup',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 所属部门
|
||||
title: this.$t('workCenter.esInspectionPlan.department'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'department',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划稽查日期
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionDate'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 稽查负责人
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectionDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 实际稽查完成日期
|
||||
title: this.$t('workCenter.esInspectionProcess.actualInspectionCompletionDate'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'actualInspectionCompletionDate',
|
||||
showCodeList: ['3', '4', '5'],
|
||||
scopedSlots: { customRender: 'actualInspectionCompletionDate' }
|
||||
},
|
||||
{ // 实际稽查人
|
||||
title: this.$t('workCenter.esInspectionProcess.actualInspector'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'actualInspector',
|
||||
showCodeList: ['3', '4', '5'],
|
||||
scopedSlots: { customRender: 'actualInspector' }
|
||||
},
|
||||
{
|
||||
// 操作
|
||||
fixed: 'right',
|
||||
title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 按节点进行过滤
|
||||
columns () {
|
||||
return this.allColumns.filter(item => {
|
||||
// 没有这个属性,就默认显示
|
||||
if (!item.showCodeList) {
|
||||
return true
|
||||
}
|
||||
// 如果有,就根据当前节点显示
|
||||
return item.showCodeList.includes(this.currentNode)
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.currentNode === '3') {
|
||||
this.getUserList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 返回用户列表
|
||||
getUserList () {
|
||||
getUserList({ pageNo: -1, pageSize: -1, order: 'desc', column: 'createTime' }).then(res => {
|
||||
if (res.success) {
|
||||
this.userList = res.result.records || []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 稽查内容
|
||||
handleInspectionContent (record) {
|
||||
this.$refs.inspectionProcessContent.show(record)
|
||||
},
|
||||
// 添加计划
|
||||
handleAdd () {
|
||||
this.$refs.inspectionProcessTableModal.show()
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
},
|
||||
handleInspectionReport (record) {
|
||||
this.$refs.inspectionProcessReport.show(record)
|
||||
},
|
||||
handleRectificationPlan (record) {
|
||||
this.$refs.inspectionProcessRectificationPlan.show(record)
|
||||
},
|
||||
// 获取向上第n个父节点
|
||||
getNumParentNode (el, n) {
|
||||
if (n < 1 || el === document.body) {
|
||||
return el.parentNode || document.body
|
||||
}
|
||||
return this.getNumParentNode(el.parentNode, n - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.table-form {
|
||||
position: relative;
|
||||
/deep/ .ant-calendar-picker {
|
||||
min-width: 130px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--标准名称/编号-->
|
||||
<a-col :md="8" :sm="12">
|
||||
<a-form-item :label="$t('workCenter.esInspectionProcess.esNumber') + '/' + $t('workCenter.esInspectionProcess.esName')">
|
||||
<j-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.esNumber') + '/' + $t('workCenter.esInspectionProcess.esName')"
|
||||
v-model="queryParam.projectName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</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 v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</j-table>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessTableModal',
|
||||
mixins: [JeroListMixin],
|
||||
components: { JTable },
|
||||
data () {
|
||||
return {
|
||||
disableMixinCreated: true,
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionPlanEs'),
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
dataSource: [{}],
|
||||
columns: [
|
||||
{ // 稽查依据标准号
|
||||
title: this.$t('workCenter.esInspectionProcess.esNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardNumber',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 稽查依据标准名称
|
||||
title: this.$t('workCenter.esInspectionProcess.esName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardName',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 计划稽查对象
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionObjects',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主责标准化工作组
|
||||
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
dataIndex: 'mainDutyStandardizationGroup',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 所属部门
|
||||
title: this.$t('workCenter.esInspectionPlan.department'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'department',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划稽查日期
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionDate'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 稽查负责人
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectionDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user