问题管理布局
This commit is contained in:
@@ -1955,4 +1955,13 @@ module.exports = {
|
||||
Reasonforreturn:'Reason for return',
|
||||
maintenanceTemplate:'Maintenance template',
|
||||
UserFeedback:'User Feedback',
|
||||
Relevantlawsregulations:'Relevant laws and regulations',
|
||||
Problemstate:'Problem state',
|
||||
descriptions:'Descriptions',
|
||||
documents:'Documents',
|
||||
examineapproveevidence:'Examine and approve evidence',
|
||||
conculsion:'Conculsion',
|
||||
progresstracking:'Progress Tracking',
|
||||
Fileupload:'File upload',
|
||||
Addresslink:'Address link',
|
||||
}
|
||||
@@ -3911,4 +3911,13 @@ module.exports = {
|
||||
Modifyremarks:'修改备注',
|
||||
Reasonforreturn:'退回原因',
|
||||
UserFeedback:'用户反馈',
|
||||
Relevantlawsregulations:'相关法规',
|
||||
Problemstate:'问题状态',
|
||||
descriptions:'描述和分析',
|
||||
documents:'相关文件',
|
||||
examineapproveevidence:'审批证据',
|
||||
conculsion:'结论',
|
||||
progresstracking:'进度追踪',
|
||||
Fileupload:'文件上传',
|
||||
Addresslink:'地址链接',
|
||||
}
|
||||
@@ -3,15 +3,6 @@
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('standard')">
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
@@ -23,110 +14,84 @@
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{$t('areaOfResponsibility')}}</span>
|
||||
<div class="title-text" :title="$t('Relevantlawsregulations')">
|
||||
<span>{{$t('Relevantlawsregulations')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('Relevantlawsregulations')"
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('RelatedItems')">
|
||||
<span>{{$t('RelatedItems')}}</span>
|
||||
</div>
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="queryParam.projectName"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||
<a-select-option v-for="(item, key) in projectNameList"
|
||||
:key="key"
|
||||
:label="item.projectName"
|
||||
:value="item.projectName">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('ProcessType')">
|
||||
<span>{{$t('ProcessType')}}</span>
|
||||
<div class="title-text" :title="$t('problemType')">
|
||||
<span>{{$t('problemType')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.problemType"
|
||||
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('areaOfResponsibility')">
|
||||
<span>{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('Problemstate')">
|
||||
<span>{{$t('Problemstate')}}</span>
|
||||
</div>
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="queryParam.flowType"
|
||||
:placeholder="$t('PleaseSelect')+$t('ProcessType')">
|
||||
<a-select-option :value="this.$t('designComplianceReview')">
|
||||
<span class="itemOption">
|
||||
{{ $t('designComplianceReview') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :value="this.$t('preHomeConfirmation')">
|
||||
<span class="itemOption">
|
||||
{{ $t('preHomeConfirmation') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :value="this.$t('verificationComplianceReview')">
|
||||
<span class="itemOption">
|
||||
{{ $t('verificationComplianceReview') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('RelatedItems')">
|
||||
<span>{{$t('RelatedItems')}}</span>
|
||||
</div>
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="queryParam.projectName"
|
||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||
<a-select-option v-for="(item, key) in projectNameList"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||
:label='item'
|
||||
:key="key"
|
||||
:value="item.projectName">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
</span>
|
||||
:value="item">
|
||||
<span style="display: inline-block;width: 100%" :title=" item">
|
||||
{{ item }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('problemType')">
|
||||
<span>{{$t('problemType')}}</span>
|
||||
</div>
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="queryParam.problemType"
|
||||
:placeholder="$t('PleaseSelect')+$t('problemType')">
|
||||
<a-select-option :value="$t('inconformity')">
|
||||
<span class="itemOption">
|
||||
{{ $t('nonConformity') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :value="$t('toTrack')">
|
||||
<span class="itemOption">
|
||||
{{ $t('Tracked') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8" v-if="isPersonnelSelection">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('Sponsor')">
|
||||
<span>{{$t('Sponsor')}}</span>
|
||||
</div>
|
||||
<PersonnelSelection :query="{db_field_name:'initiator',db_field_txt:$t('Sponsor')}"
|
||||
:isInput="true"
|
||||
class="box-input"
|
||||
:personneQuery="queryParam"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="queryParam.initiatorName"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8" v-if="isPersonnelSelection">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('personLiable')">
|
||||
<span>{{$t('personLiable')}}</span>
|
||||
</div>
|
||||
<PersonnelSelection :query="{db_field_name:'duty',db_field_txt:$t('personLiable')}"
|
||||
:isInput="true"
|
||||
class="box-input"
|
||||
:personneQuery="queryParam"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="queryParam.dutyName"/>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
@@ -142,6 +107,10 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleAdd" v-has="'dict:add'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
<div @click="handleExport" v-has="'ncrTrack:exportData'" class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{ $t('export') }}
|
||||
@@ -161,10 +130,33 @@
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="standard" slot-scope="text,result">
|
||||
<a @click="designFlowStatusClick(result)" class="textName" :title="text">
|
||||
{{text}}
|
||||
</a>
|
||||
<!-- <span slot="standard" slot-scope="text,result">-->
|
||||
<!-- <a @click="designFlowStatusClick(result)" class="textName" :title="text">-->
|
||||
<!-- {{text}}-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<div slot="CertificationProgress" slot-scope="text,result">
|
||||
<span class="box-content-Progress box-content-cou"
|
||||
:style="{'width':long=='zh-cn'?'116px' : '148px'}"
|
||||
:class="CertificationColor[result.certificationProgress]"
|
||||
@click="CertificationProgressClick(result)"
|
||||
>
|
||||
{{result.certificationProgress_dictText ? result.certificationProgress_dictText : $t('toBeStarted')}}
|
||||
</span>
|
||||
</div>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation"
|
||||
@click="detil(record)">
|
||||
{{ $t('See') }}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
@click="edit(record)">
|
||||
{{ $t('edit') }}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
@click="deleteLib(record)">
|
||||
{{ $t('deleteLib') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -181,6 +173,8 @@
|
||||
/>
|
||||
</div>
|
||||
<designCompliance ref="designComplianceRef"/>
|
||||
<addModel ref="addModelRef" @addModelForm="addModelForm"/>
|
||||
<detilModel ref="detilModelRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -189,12 +183,16 @@
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
|
||||
import store from '@/store/'
|
||||
import addModel from './moudles/addModel'
|
||||
import detilModel from './moudles/detilModel'
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'projectNonConformance',
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
addModel,
|
||||
detilModel,
|
||||
designCompliance
|
||||
},
|
||||
mixins:[ResizeHeader, ResizeColumnProvide],
|
||||
@@ -205,10 +203,16 @@
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
projectNameList: [],
|
||||
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||
CertificationColor: {
|
||||
'red': 'nonConformityColor',
|
||||
'green': 'accordColor',
|
||||
'yellow': 'TrackedColor',
|
||||
},
|
||||
toggleSearchStatus: false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
title: this.$t('title'),
|
||||
align: 'left',
|
||||
dataIndex: 'serialNumber',
|
||||
width: 170,
|
||||
@@ -216,33 +220,18 @@
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
title: this.$t('Relevantlawsregulations'),
|
||||
align: 'left',
|
||||
dataIndex: 'title',
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{
|
||||
title: this.$t('ProcessType'),
|
||||
align: 'left',
|
||||
dataIndex: 'flowType',
|
||||
width: 150,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'left',
|
||||
dataIndex: 'dutyTerritory',
|
||||
width: 100,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
align: 'left',
|
||||
dataIndex: 'projectName',
|
||||
width: 180,
|
||||
dataIndex: 'RelatedItems',
|
||||
width: 170,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -250,23 +239,55 @@
|
||||
title: this.$t('problemType'),
|
||||
align: 'left',
|
||||
dataIndex: 'problemType',
|
||||
width: 170,
|
||||
sorter:true,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'CertificationProgress' }
|
||||
},
|
||||
{
|
||||
title: this.$t('statisticalNodes'),
|
||||
align: 'left',
|
||||
dataIndex: 'dutyTerritory',
|
||||
width: 100,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('creator'),
|
||||
align: 'left',
|
||||
dataIndex: 'creator',
|
||||
width: 100,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Problemstate'),
|
||||
align: 'left',
|
||||
dataIndex: 'Problemstate',
|
||||
width: 120,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
title: this.$t('createTime'),
|
||||
align: 'left',
|
||||
dataIndex: 'initiator',
|
||||
dataIndex: 'createTime',
|
||||
sorter:true,
|
||||
width: 100
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('personLiable'),
|
||||
title: this.$t('updateTime'),
|
||||
align: 'left',
|
||||
dataIndex: 'duty',
|
||||
dataIndex: 'updateTime',
|
||||
sorter:true,
|
||||
width: 100
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
fixed: 'right',
|
||||
width: localStorage.getItem('language') == 'zh-cn' ? 160 : 180,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
total: 0,
|
||||
@@ -274,6 +295,7 @@
|
||||
pageNo: 1,
|
||||
orderBy: '1',
|
||||
orderByField: '',
|
||||
long: '',
|
||||
isPersonnelSelection:true,
|
||||
url: {
|
||||
page: '/project/ncrTrackController/queryPage',
|
||||
@@ -288,6 +310,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.long = localStorage.getItem('language') || 'zh-cn'
|
||||
this.getList()
|
||||
this.getNameList()
|
||||
},
|
||||
@@ -320,6 +343,9 @@
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
addModelForm(){
|
||||
this.getList()
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.content = []
|
||||
this.selectedRowKeys = value
|
||||
@@ -384,6 +410,31 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd(){
|
||||
this.$refs.addModelRef.add()
|
||||
},
|
||||
edit(record){
|
||||
this.$refs.addModelRef.edit(JSON.parse(JSON.stringify(record)))
|
||||
},
|
||||
detil(record){
|
||||
this.designFlowStatusClick(record)
|
||||
},
|
||||
deleteLib(record){
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteBatch, { id: record.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleExport() {
|
||||
let query = {
|
||||
...this.queryParam,
|
||||
|
||||
@@ -0,0 +1,757 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('title')">{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="title">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.title'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="issue">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.issue'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('creator')">{{$t('creator')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.creator'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('creator')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('createTime')">{{$t('createTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="createTime">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.createTime'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('createTime')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<Standardselection
|
||||
:query="{'db_field_txt':$t('standard')}"
|
||||
:standard="formInline"
|
||||
:disabled="false"
|
||||
@change="StandardselectionChange"
|
||||
v-model="formInline.serialNumber"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="formInline.projectName"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
mode="multiple"
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||
<a-select-option v-for="(item, key) in projectNameList"
|
||||
:key="key"
|
||||
:label="item.projectName"
|
||||
:value="item.projectName">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||
allowClear
|
||||
show-search
|
||||
mode="multiple"
|
||||
class="box-input-search"
|
||||
optionFilterProp="label"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="formInline.firstLevelDutyTerritory">
|
||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||
:key="key"
|
||||
:label="item.key"
|
||||
:value="item.key">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||
{{ item.key }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="formInline.flowType"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||
:label='item'
|
||||
:key="key"
|
||||
:value="item">
|
||||
<span style="display: inline-block;width: 100%" :title=" item">
|
||||
{{ item }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="descriptions">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.descriptions'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('documents')">{{$t('documents')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="xgwj">
|
||||
<div v-for="(item,index) in formInline.list" :key="index">
|
||||
<a-input class="box-input"
|
||||
style='width: 89%'
|
||||
v-model='item.xgwj'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||
v-if="formInline.list.length - 1 == index"
|
||||
type="plus"/>
|
||||
<a-icon class="icon-text" v-if="formInline.list.length > 1 && formInline.list.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
|
||||
@click="deleteClick(index)"
|
||||
type="minus"/>
|
||||
</div>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessory_id')">
|
||||
{{ (formInline.accessory_id === 'null' || formInline.accessory_id === '' ||
|
||||
formInline.accessory_id == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||
<div v-for="(item,index) in formInline.progresstrackinglist" :key="index">
|
||||
<!-- <span>{{item}}</span>-->
|
||||
<a-input class="box-input"
|
||||
style='width: 89%'
|
||||
v-model='item.text'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
|
||||
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progresstrackinglist.length - 1 == index">{{$t('newlyAdded')}}</a>
|
||||
<a @click="deleteprogresstrackingClick(index,item)" v-if="formInline.progresstrackinglist.length > 0" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="conculsion">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.conculsion'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="xgwj">
|
||||
<div v-for="(item,index) in formInline.examineapproveevidencelist" :key="index">
|
||||
<a-input class="box-input"
|
||||
style='width: 89%'
|
||||
v-model='item.xgwj'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||
v-if="formInline.examineapproveevidencelist.length - 1 == index"
|
||||
type="plus"/>
|
||||
<a-icon class="icon-text" v-if="formInline.examineapproveevidencelist.length > 1 && formInline.examineapproveevidencelist.length - 1 !== index"
|
||||
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
||||
type="minus" :disabled="disabled"/>
|
||||
</div>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessory_id')">
|
||||
{{ (formInline.examineapproveevidence === 'null' || formInline.examineapproveevidence === '' ||
|
||||
formInline.examineapproveevidence == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
||||
<a-modal
|
||||
:title="$t('progresstracking')"
|
||||
:width="600"
|
||||
:visible="visibletrack"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="Cancel"
|
||||
>
|
||||
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('progresstracking')">
|
||||
{{$t('progresstracking')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="text">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
|
||||
v-model="formInlinetracking.text"
|
||||
style="width: 90%"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import defaultTemplate from './defaultTemplate'
|
||||
// import solicitOpinions from './solicitOpinions'
|
||||
// import releaseStandard from './releaseStandard'
|
||||
// import industryTemplate from './industryTemplate'
|
||||
// import addModel from './a/ddModel'
|
||||
import Standardselection from '@/components/Standardselection/index'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'fillAdd',
|
||||
components: {
|
||||
// defaultTemplate,
|
||||
// solicitOpinions,
|
||||
// releaseStandard,
|
||||
// industryTemplate,
|
||||
// addModel
|
||||
Standardselection,
|
||||
uploadFile,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
problemType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
},
|
||||
visible: false,
|
||||
visibletrack: false,
|
||||
rulestracking:{
|
||||
text: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
formInline: {
|
||||
list:[{}],
|
||||
examineapproveevidencelist:[{}],
|
||||
progresstrackinglist:[{}]
|
||||
},
|
||||
formInlinetracking:{},
|
||||
confirmLoading: false,
|
||||
title: '',
|
||||
disabled: false,
|
||||
isTrue: false,
|
||||
chapterContentsList: [],
|
||||
firstLevelDutyTerritoryList:[],
|
||||
projectNameList: [],
|
||||
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||
templateDisabled: false,
|
||||
contentTemplateList: [
|
||||
{
|
||||
id: '1',
|
||||
text: this.$t('defaultTemplate')
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
text: this.$t('newRequestCommentListTemplate')
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
text: this.$t('NewReleasedStandardTemplate')
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
text: this.$t('industryInformationDynamicTemplate')
|
||||
}
|
||||
],
|
||||
index:'',
|
||||
url: {
|
||||
add: '/report/lawsMonthlyReportWriteEO/add',
|
||||
edit: '/report/lawsMonthlyReportWriteEO/edit',
|
||||
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// bringInStandardInformationClick() {
|
||||
// this.$refs.addModelRef.addModel()
|
||||
// },
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
addModelForm(value) {
|
||||
this.$refs.defaultTemplateRef.getStandData(value)
|
||||
},
|
||||
getFirstLevelDutyTerritory() {
|
||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.firstLevelDutyTerritoryList = res.result
|
||||
} else {
|
||||
this.firstLevelDutyTerritoryList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
StandardselectionChange(value, id) {
|
||||
console.log(id)
|
||||
this.formInline.documentId = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
...mapGetters(['userInfo']),
|
||||
add() {
|
||||
console.log(this.userInfo())
|
||||
this.templateDisabled = false
|
||||
this.getNameList()
|
||||
this.getFirstLevelDutyTerritory()
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.formInline = {
|
||||
list:[{}],
|
||||
examineapproveevidencelist:[{}],
|
||||
progresstrackinglist:[{}]
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
this.getNameList()
|
||||
this.getFirstLevelDutyTerritory()
|
||||
this.title = this.$t('edit')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.templateDisabled = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = row
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
addClick(index){
|
||||
this.formInline.list.splice(index + 1, 0, {})
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deleteClick(index) {
|
||||
this.formInline.list.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addvidenceClick(index){
|
||||
this.formInline.examineapproveevidencelist.splice(index + 1, 0, {})
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deletevidenceClick(index) {
|
||||
this.formInline.examineapproveevidencelist.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addprogresstrackingClick(index){
|
||||
this.index = index
|
||||
this.formInlinetracking = {}
|
||||
this.visibletrack = true
|
||||
this.$nextTick(() => {
|
||||
this.formInlinetracking = { ...this.formInlinetracking }
|
||||
this.isTrue = true
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
deleteprogresstrackingClick(index,item) {
|
||||
if(item.text && item.text != ''){
|
||||
if(index == 0){
|
||||
item.text = ''
|
||||
}else{
|
||||
this.formInline.progresstrackinglist.splice(index, 1)
|
||||
}
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
Cancel(){
|
||||
this.visibletrack = false
|
||||
this.formInlinetracking = {}
|
||||
this.$refs.ruleFormtracking.clearValidate()
|
||||
},
|
||||
handleOk(){
|
||||
console.log(this.formInlinetracking)
|
||||
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
this.$refs.ruleFormtracking.validate(valid => {
|
||||
if (valid) {
|
||||
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.text
|
||||
this.formInline.progresstrackinglist.forEach((item,index) => {
|
||||
console.log(item.text)
|
||||
if(!item.text){
|
||||
this.formInline.progresstrackinglist.splice(0,1)
|
||||
}
|
||||
})
|
||||
this.formInline.progresstrackinglist.splice(this.index+1, 1, {text:text})
|
||||
this.visibletrack = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit() {
|
||||
console.log(this.formInline)
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let text = ''
|
||||
if (this.$refs.defaultTemplateRef) {
|
||||
text = 'defaultTemplateRef'
|
||||
} else if (this.$refs.solicitOpinionsRef) {
|
||||
text = 'solicitOpinionsRef'
|
||||
} else if (this.$refs.releaseStandardRef) {
|
||||
text = 'releaseStandardRef'
|
||||
} else if (this.$refs.industryTemplateRef) {
|
||||
text = 'industryTemplateRef'
|
||||
}
|
||||
this.$refs[text].getData((val) => {
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
} else {
|
||||
url = this.url.add
|
||||
}
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] && formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = Object.assign(val, {
|
||||
month: formInline.month,
|
||||
memoriesChapter: formInline.memoriesChapter,
|
||||
contentTemplate: formInline.contentTemplate,
|
||||
memoriesChapterOne:formInline.memoriesChapterOne
|
||||
})
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('fillAddForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.ant-select-disabled {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||
width: 255px;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-node-content-wrapper {
|
||||
float: right;
|
||||
margin-top: -2px !important;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-title {
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,751 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('title')">{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="title">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.title'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemType')">{{$t('problemType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="problemType">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.problemType"
|
||||
:placeholder="$t('PleaseSelect')+$t('problemType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'wen4_ti2_lei4_xing2'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="'PS-issue'">{{'PS-issue'}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="issue">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.issue'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('creator')">{{$t('creator')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.creator'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('creator')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('createTime')">{{$t('createTime')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="createTime">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.createTime'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('createTime')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('Relevantlawsregulations')">{{$t('Relevantlawsregulations')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<Standardselection
|
||||
:query="{'db_field_txt':$t('standard')}"
|
||||
:standard="formInline"
|
||||
:disabled="false"
|
||||
@change="StandardselectionChange"
|
||||
v-model="formInline.serialNumber"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('RelatedItems')">{{$t('RelatedItems')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="formInline.projectName"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
mode="multiple"
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
|
||||
<a-select-option v-for="(item, key) in projectNameList"
|
||||
:key="key"
|
||||
:label="item.projectName"
|
||||
:value="item.projectName">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="creator">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
|
||||
allowClear
|
||||
show-search
|
||||
mode="multiple"
|
||||
class="box-input-search"
|
||||
optionFilterProp="label"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="formInline.firstLevelDutyTerritory">
|
||||
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
|
||||
:key="key"
|
||||
:label="item.key"
|
||||
:value="item.key">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.key ">
|
||||
{{ item.key }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('Problemstate')">{{$t('Problemstate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||
<a-select allowClear
|
||||
class="box-input"
|
||||
v-model="formInline.flowType"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
:autoClearSearchValue="false"
|
||||
:placeholder="$t('PleaseSelect')+$t('Problemstate')">
|
||||
<a-select-option v-for="(item, key) in ProblemstateList"
|
||||
:label='item'
|
||||
:key="key"
|
||||
:value="item">
|
||||
<span style="display: inline-block;width: 100%" :title=" item">
|
||||
{{ item }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="descriptions">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.descriptions'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('documents')">{{$t('documents')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="xgwj">
|
||||
<div v-for="(item,index) in formInline.list" :key="index">
|
||||
<a-input class="box-input"
|
||||
style='width: 94%'
|
||||
v-model='item.xgwj'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||
v-if="formInline.list.length - 1 == index"
|
||||
type="plus"/>
|
||||
<a-icon class="icon-text" v-if="formInline.list.length > 1 && formInline.list.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
|
||||
@click="deleteClick(index)"
|
||||
type="minus"/>
|
||||
</div>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessory_id')">
|
||||
{{ (formInline.accessory_id === 'null' || formInline.accessory_id === '' ||
|
||||
formInline.accessory_id == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||
<div v-for="(item,index) in formInline.progresstrackinglist" :key="index">
|
||||
<!-- <span>{{item}}</span>-->
|
||||
<a-input class="box-input"
|
||||
style='width: 94%'
|
||||
v-model='item.text'
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
|
||||
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progresstrackinglist.length - 1 == index">{{$t('newlyAdded')}}</a>
|
||||
<a @click="deleteprogresstrackingClick(index)" v-if="formInline.progresstrackinglist.length > 1 && formInline.progresstrackinglist.length - 1 !== index" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="conculsion">
|
||||
<a-input class="box-input"
|
||||
v-model='formInline.conculsion'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<!-- <span class="Required">*</span>-->
|
||||
<span class="title-text-text"
|
||||
:title="$t('examineapproveevidence')">{{$t('examineapproveevidence')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="xgwj">
|
||||
<div v-for="(item,index) in formInline.examineapproveevidencelist" :key="index">
|
||||
<a-input class="box-input"
|
||||
style='width: 94%'
|
||||
v-model='item.xgwj'
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('Addresslink')"/>
|
||||
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||
v-if="formInline.examineapproveevidencelist.length - 1 == index"
|
||||
type="plus"/>
|
||||
<a-icon class="icon-text" v-if="formInline.examineapproveevidencelist.length > 1 && formInline.examineapproveevidencelist.length - 1 !== index"
|
||||
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
||||
type="minus" :disabled="disabled"/>
|
||||
</div>
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('accessory_id')">
|
||||
{{ (formInline.examineapproveevidence === 'null' || formInline.examineapproveevidence === '' ||
|
||||
formInline.examineapproveevidence == null) ? $t('Fileupload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
||||
<a-modal
|
||||
:title="$t('progresstracking')"
|
||||
:width="600"
|
||||
:visible="visibletrack"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="Cancel"
|
||||
>
|
||||
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('progresstracking')">
|
||||
{{$t('progresstracking')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="text">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
|
||||
v-model="formInlinetracking.text"
|
||||
style="width: 90%"
|
||||
:maxLength="500"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import defaultTemplate from './defaultTemplate'
|
||||
// import solicitOpinions from './solicitOpinions'
|
||||
// import releaseStandard from './releaseStandard'
|
||||
// import industryTemplate from './industryTemplate'
|
||||
// import addModel from './a/ddModel'
|
||||
import Standardselection from '@/components/Standardselection/index'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'fillAdd',
|
||||
components: {
|
||||
// defaultTemplate,
|
||||
// solicitOpinions,
|
||||
// releaseStandard,
|
||||
// industryTemplate,
|
||||
// addModel
|
||||
Standardselection,
|
||||
uploadFile,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
problemType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('problemType') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
},
|
||||
visible: false,
|
||||
visibletrack: false,
|
||||
rulestracking:{
|
||||
text: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
formInline: {
|
||||
list:[{}],
|
||||
examineapproveevidencelist:[{}],
|
||||
progresstrackinglist:[{}]
|
||||
},
|
||||
formInlinetracking:{},
|
||||
confirmLoading: false,
|
||||
title: '',
|
||||
disabled: false,
|
||||
isTrue: false,
|
||||
chapterContentsList: [],
|
||||
firstLevelDutyTerritoryList:[],
|
||||
projectNameList: [],
|
||||
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
||||
templateDisabled: false,
|
||||
contentTemplateList: [
|
||||
{
|
||||
id: '1',
|
||||
text: this.$t('defaultTemplate')
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
text: this.$t('newRequestCommentListTemplate')
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
text: this.$t('NewReleasedStandardTemplate')
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
text: this.$t('industryInformationDynamicTemplate')
|
||||
}
|
||||
],
|
||||
index:'',
|
||||
url: {
|
||||
add: '/report/lawsMonthlyReportWriteEO/add',
|
||||
edit: '/report/lawsMonthlyReportWriteEO/edit',
|
||||
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// bringInStandardInformationClick() {
|
||||
// this.$refs.addModelRef.addModel()
|
||||
// },
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
addModelForm(value) {
|
||||
this.$refs.defaultTemplateRef.getStandData(value)
|
||||
},
|
||||
getFirstLevelDutyTerritory() {
|
||||
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.firstLevelDutyTerritoryList = res.result
|
||||
} else {
|
||||
this.firstLevelDutyTerritoryList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
StandardselectionChange(value, id) {
|
||||
console.log(id)
|
||||
this.formInline.documentId = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
...mapGetters(['userInfo']),
|
||||
add() {
|
||||
console.log(this.userInfo())
|
||||
this.templateDisabled = false
|
||||
this.getNameList()
|
||||
this.getFirstLevelDutyTerritory()
|
||||
this.title = this.$t('newlyAdded')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.formInline = {
|
||||
list:[{}],
|
||||
examineapproveevidencelist:[{}],
|
||||
progresstrackinglist:[{}]
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
this.getNameList()
|
||||
this.getFirstLevelDutyTerritory()
|
||||
this.title = this.$t('edit')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.templateDisabled = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = row
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
addClick(index){
|
||||
this.formInline.list.splice(index + 1, 0, {})
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deleteClick(index) {
|
||||
this.formInline.list.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addvidenceClick(index){
|
||||
this.formInline.examineapproveevidencelist.splice(index + 1, 0, {})
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deletevidenceClick(index) {
|
||||
this.formInline.examineapproveevidencelist.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addprogresstrackingClick(index){
|
||||
this.index = index
|
||||
this.formInlinetracking = {}
|
||||
this.visibletrack = true
|
||||
this.$nextTick(() => {
|
||||
this.formInlinetracking = { ...this.formInlinetracking }
|
||||
this.isTrue = true
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
deleteprogresstrackingClick(index) {
|
||||
this.formInline.progresstrackinglist.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
Cancel(){
|
||||
this.visibletrack = false
|
||||
this.formInlinetracking = {}
|
||||
this.$refs.ruleFormtracking.clearValidate()
|
||||
},
|
||||
handleOk(){
|
||||
console.log(this.formInlinetracking)
|
||||
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
this.$refs.ruleFormtracking.validate(valid => {
|
||||
if (valid) {
|
||||
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.text
|
||||
this.formInline.progresstrackinglist.forEach((item,index) => {
|
||||
console.log(item.text)
|
||||
if(!item.text){
|
||||
this.formInline.progresstrackinglist.splice(0,1)
|
||||
}
|
||||
})
|
||||
this.formInline.progresstrackinglist.splice(this.index+1, 1, {text:text})
|
||||
this.visibletrack = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit() {
|
||||
console.log(this.formInline)
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let text = ''
|
||||
if (this.$refs.defaultTemplateRef) {
|
||||
text = 'defaultTemplateRef'
|
||||
} else if (this.$refs.solicitOpinionsRef) {
|
||||
text = 'solicitOpinionsRef'
|
||||
} else if (this.$refs.releaseStandardRef) {
|
||||
text = 'releaseStandardRef'
|
||||
} else if (this.$refs.industryTemplateRef) {
|
||||
text = 'industryTemplateRef'
|
||||
}
|
||||
this.$refs[text].getData((val) => {
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
} else {
|
||||
url = this.url.add
|
||||
}
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] && formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = Object.assign(val, {
|
||||
month: formInline.month,
|
||||
memoriesChapter: formInline.memoriesChapter,
|
||||
contentTemplate: formInline.contentTemplate,
|
||||
memoriesChapterOne:formInline.memoriesChapterOne
|
||||
})
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('fillAddForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.ant-select-disabled {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||
width: 255px;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-node-content-wrapper {
|
||||
float: right;
|
||||
margin-top: -2px !important;
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-title {
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user