Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-03-24 15:52:24 +08:00
5 changed files with 189 additions and 145 deletions
+1 -1
View File
@@ -1709,5 +1709,5 @@ module.exports = {
cause:'cause', cause:'cause',
implementationrecords:'Fault handling measures and emergency response implementation records', implementationrecords:'Fault handling measures and emergency response implementation records',
onlyDataWithListStatusDraftCanBeDeleted:'Only data with a list status of Draft can be deleted', onlyDataWithListStatusDraftCanBeDeleted:'Only data with a list status of Draft can be deleted',
implementationDateTwo:'Implementation Date',
} }
+1
View File
@@ -1809,4 +1809,5 @@ module.exports = {
cause:'原因', cause:'原因',
implementationrecords:'故障处置措施和应急响应实施记录', implementationrecords:'故障处置措施和应急响应实施记录',
onlyDataWithListStatusDraftCanBeDeleted:'只能删除清单状态为草稿的数据', onlyDataWithListStatusDraftCanBeDeleted:'只能删除清单状态为草稿的数据',
implementationDateTwo:'实施日期',
} }
+183 -140
View File
@@ -233,9 +233,9 @@
</div> </div>
<div> <div>
<div class="header-text" style='margin-bottom: 0px'> <div class="header-text" style='margin-bottom: 0px'>
{{$t('DetailsPhasedImplementation')}} {{$t('DetailsPhasedImplementation')}}
</div> </div>
<a-button key="submit" type="primary" @click="newlyAdded" style='float: right; z-index: 99; margin-bottom: 5px'> <a-button key="submit" type="primary" @click="newlyAdded" style='float: right; z-index: 99; margin-bottom: 5px'>
{{ $t('newlyAdded') }} {{ $t('newlyAdded') }}
</a-button> </a-button>
@@ -252,9 +252,18 @@
{{$t('edit')}} {{$t('edit')}}
</a> </a>
<a @click="deleteLib(result,index)" style="margin-right: 10px"> <a @click="deleteLib(result,index)" style="margin-right: 10px">
{{$t("deleteLib")}} {{$t('deleteLib')}}
</a> </a>
</span> </span>
<span slot="standNumberOrClause">
<span :title="$t('Statutenumberclause')">{{$t('Statutenumberclause')}}</span>
</span>
<span slot="implementationDateTwo">
<span :title="$t('implementationDateTwo')">{{$t('implementationDateTwo')}}</span>
</span>
<span slot="Typeofimplementation">
<span :title="$t('Typeofimplementation')">{{$t('Typeofimplementation')}}</span>
</span>
</a-table> </a-table>
</div> </div>
<a-modal <a-modal
@@ -265,62 +274,69 @@
:maskClosable="false" :maskClosable="false"
@cancel="visibleGrad = false" @cancel="visibleGrad = false"
> >
<a-form-model :rules="tablerules" :model="tabledataGrad" <a-form-model :rules="tablerules" :model="tabledataGrad"
ref="tableruleForm"> ref="tableruleForm">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text">
<span>{{$t('Statutenumberclause')}}</span>
</div>
<a-form-model-item class="itemModel" prop="standNumberOrClause">
<a-input class="box-input" v-model="tabledataGrad.standNumberOrClause"
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span>{{$t('Typeofimplementation')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType"
:placeholder="$t('PleaseSelect')+$t('Typeofimplementation')"
:type="'select'"
@changeQuery='implementationTypeChange'
:triggerChange="false" dictCode="shi2_shi1_lei4_xing2"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span>{{$t('ImplementationDate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-date-picker class="box-input" v-model="tabledataGrad.implementationDate"
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')"
format="YYYY-MM-DD"
@change='dateChangeOne'
style="width: 100%"/>
<!-- :disabledDate="disabledDate"-->
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span>{{$t('remarks')}}</span> <span class="Required">*</span>
<span :title="$t('Statutenumberclause')">{{$t('Statutenumberclause')}}</span>
</div>
<a-form-model-item class="itemModel" prop="standNumberOrClause">
<a-input class="box-input" v-model.trim="tabledataGrad.standNumberOrClause"
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/>
</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 :title="$t('Typeofimplementation')">{{$t('Typeofimplementation')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="implementationType">
<j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType"
:placeholder="$t('PleaseSelect')+$t('Typeofimplementation')"
:type="'select'"
@changeQuery='implementationTypeChange'
:triggerChange="false" dictCode="shi2_shi1_lei4_xing2"/>
</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 :title="$t('implementationDateTwo')">{{$t('implementationDateTwo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="implementationDate">
<a-date-picker class="box-input" v-model="tabledataGrad.implementationDate"
:placeholder="$t('PleaseSelect')+$t('implementationDateTwo')"
format="YYYY-MM-DD"
@change='dateChangeOne'
style="width: 100%"/>
<!-- :disabledDate="disabledDate"-->
</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 :title="$t('remarks')">{{$t('remarks')}}</span>
</div> </div>
<a-form-model-item class="itemModel" style="height: auto" prop="remarks"> <a-form-model-item class="itemModel" style="height: auto" prop="remarks">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')" <a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
:rows="4" v-model="tabledataGrad.remarks"/> :rows="4" v-model="tabledataGrad.remarks"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<template slot="footer"> <template slot="footer">
<a-button key="back" @click="visibleGrad = false"> <a-button key="back" @click="visibleGrad = false">
{{ $t('cancel') }} {{ $t('cancel') }}
@@ -331,78 +347,85 @@
</template> </template>
</a-modal> </a-modal>
<a-modal <a-modal
:title="$t('edit')" :title="$t('edit')"
:width="900" :width="900"
:visible="tablevisibleGrad" :visible="tablevisibleGrad"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@cancel="tablevisibleGrad = false" @cancel="tablevisibleGrad = false"
> >
<a-form-model :rules="tablerules" :model="tabledataGrad" <a-form-model :rules="tablerules" :model="tabledataGrad"
ref="tableruleFormedit"> ref="tableruleFormedit">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span>{{$t('Statutenumberclause')}}</span> <span class="Required">*</span>
<span :title="$t('Statutenumberclause')">{{$t('Statutenumberclause')}}</span>
</div>
<a-form-model-item class="itemModel" prop="standNumberOrClause">
<a-input class="box-input" v-model.trim="tabledataGrad.standNumberOrClause"
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="standNumberOrClause"> </a-col>
<a-input class="box-input" v-model="tabledataGrad.standNumberOrClause" <a-col :span="12">
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/> <div class="box-title-text">
</a-form-model-item> <div class="title-text">
</div> <span class="Required">*</span>
</a-col> <span :title="$t('Typeofimplementation')">{{$t('Typeofimplementation')}}</span>
<a-col :span="12"> </div>
<div class="box-title-text"> <a-form-model-item class="itemModel-multi" prop="implementationType">
<div class="title-text"> <j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType"
<span>{{$t('Typeofimplementation')}}</span> :placeholder="$t('PleaseSelect')+$t('Typeofimplementation')"
:type="'select'"
@changeQuery='implementationTypeChange'
:triggerChange="false" dictCode="shi2_shi1_lei4_xing2"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel"> </a-col>
<j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType" </a-row>
:placeholder="$t('PleaseSelect')+$t('Typeofimplementation')" <a-row :gutter="24">
:type="'select'" <a-col :span="12">
@changeQuery='implementationTypeChange' <div class="box-title-text">
:triggerChange="false" dictCode="shi2_shi1_lei4_xing2"/> <div class="title-text">
</a-form-model-item> <span class="Required">*</span>
</div> <span :title="$t('implementationDateTwo')">{{$t('implementationDateTwo')}}</span>
</a-col> </div>
<a-col :span="12"> <a-form-model-item class="itemModel" prop="implementationDate">
<div class="box-title-text"> <a-date-picker class="box-input" v-model="tabledataGrad.implementationDate"
<div class="title-text"> :placeholder="$t('PleaseSelect')+$t('implementationDateTwo')"
<span>{{$t('ImplementationDate')}}</span> format="YYYY-MM-DD"
@change='dateChangeOne'
style="width: 100%"/>
<!-- :disabledDate="disabledDate"-->
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel"> </a-col>
<a-date-picker class="box-input" v-model="tabledataGrad.implementationDate" </a-row>
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')" <a-row :gutter="24">
format="YYYY-MM-DD" <a-col :span="24">
@change='dateChangeOne' <div class="box-title-text">
style="width: 100%"/> <div class="title-text">
<!-- :disabledDate="disabledDate"--> <span :title="$t('remarks')">{{$t('remarks')}}</span>
</a-form-model-item> </div>
</div> <a-form-model-item class="itemModel" style="height: auto" prop="remarks">
</a-col> <a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
<a-col :span="12"> :rows="4" v-model="tabledataGrad.remarks"/>
<div class="box-title-text"> </a-form-model-item>
<div class="title-text">
<span>{{$t('remarks')}}</span>
</div> </div>
<a-form-model-item class="itemModel" style="height: auto" prop="remarks"> </a-col>
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')" </a-row>
:rows="4" v-model="tabledataGrad.remarks"/> </a-form-model>
</a-form-model-item> <template slot="footer">
</div> <a-button key="back" @click="tablevisibleGrad = false">
</a-col> {{ $t('cancel') }}
</a-row> </a-button>
</a-form-model> <a-button key="submit" type="primary" @click="tablehandleSubmit">
<template slot="footer"> {{ $t('determine') }}
<a-button key="back" @click="tablevisibleGrad = false"> </a-button>
{{ $t('cancel') }} </template>
</a-button> </a-modal>
<a-button key="submit" type="primary" @click="tablehandleSubmit">
{{ $t('determine') }}
</a-button>
</template>
</a-modal>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
@@ -449,6 +472,11 @@
rules: {}, rules: {},
tablerules: { tablerules: {
standNumberOrClause: [ standNumberOrClause: [
{
required: true,
message: this.$t('Statutenumberclause') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{ {
// required: true, // required: true,
max: 200, max: 200,
@@ -456,6 +484,20 @@
trigger: 'blur' trigger: 'blur'
} }
], ],
implementationType:[
{
required: true,
message: this.$t('Typeofimplementation') + this.$t('cannotEmpty'),
trigger: 'change'
},
],
implementationDate:[
{
required: true,
message: this.$t('implementationDateTwo') + this.$t('cannotEmpty'),
trigger: 'change'
},
],
remarks: [ remarks: [
{ {
// required: true, // required: true,
@@ -495,25 +537,27 @@
], ],
columnsGrading: [ columnsGrading: [
{ {
title: this.$t('Statutenumberclause'),
dataIndex: 'standNumberOrClause', dataIndex: 'standNumberOrClause',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 160 width: 160,
scopedSlots: { title: 'standNumberOrClause' }
}, },
{ {
title: this.$t('Typeofimplementation'), // title: this.$t('Typeofimplementation'),
dataIndex: 'implementationTypeText', dataIndex: 'implementationTypeText',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 150 width: 150,
scopedSlots: { title: 'Typeofimplementation' }
}, },
{ {
title: this.$t('ImplementationDate'), // title: this.$t('implementationDateTwo'),
dataIndex: 'implementationDate', dataIndex: 'implementationDate',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 150 width: 150,
scopedSlots: { title: 'implementationDateTwo' }
}, },
{ {
title: this.$t('remarks'), title: this.$t('remarks'),
@@ -530,45 +574,44 @@
scopedSlots: { customRender: 'Gradoperation' } scopedSlots: { customRender: 'Gradoperation' }
} }
], ],
dataGrad: [], dataGrad: []
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
tablehandleSubmit(){ tablehandleSubmit() {
this.$refs.tableruleFormedit.validate((valid) => { this.$refs.tableruleFormedit.validate((valid) => {
if(valid){ if (valid) {
this.tablevisibleGrad = false this.tablevisibleGrad = false
console.log(this.tabledataGrad)
this.dataGradto[this.tabledataIndex] = this.tabledataGrad this.dataGradto[this.tabledataIndex] = this.tabledataGrad
this.dataGradto= [... this.dataGradto] this.dataGradto = [...this.dataGradto]
} }
}) })
}, },
deleteLib(val,index) { deleteLib(val, index) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmDelete'), content: _this.$t('ConfirmDelete'),
onOk() { onOk() {
_this.dataGradto.splice(index,1) _this.dataGradto.splice(index, 1)
_this.dataGradto = [..._this.dataGradto] _this.dataGradto = [..._this.dataGradto]
} }
}) })
}, },
newlyAdded(){ newlyAdded() {
this.tabledataGrad = {} this.tabledataGrad = {}
this.visibleGrad = true this.visibleGrad = true
}, },
handeredit(result,index){ handeredit(result, index) {
this.tablevisibleGrad = true this.tablevisibleGrad = true
this.tabledataIndex = index this.tabledataIndex = index
this.tabledataGrad = JSON.parse(JSON.stringify(result)) this.tabledataGrad = JSON.parse(JSON.stringify(result))
}, },
handleSubmit(){ handleSubmit() {
this.$refs.tableruleForm.validate(valid => { this.$refs.tableruleForm.validate(valid => {
if (valid){ if (valid) {
this.dataGradto.push(this.tabledataGrad) this.dataGradto.push(this.tabledataGrad)
this.visibleGrad = false this.visibleGrad = false
} }
@@ -638,7 +681,7 @@
this.tabledataGrad.implementationDate = this.tabledataGrad.implementationDate ? moment(this.tabledataGrad.implementationDate).format('YYYY-MM-DD') : '' this.tabledataGrad.implementationDate = this.tabledataGrad.implementationDate ? moment(this.tabledataGrad.implementationDate).format('YYYY-MM-DD') : ''
console.log(this.tabledataGrad.implementationDate) console.log(this.tabledataGrad.implementationDate)
}, },
implementationTypeChange(val){ implementationTypeChange(val) {
this.tabledataGrad.implementationTypeText = val this.tabledataGrad.implementationTypeText = val
}, },
onChange(item) { onChange(item) {
@@ -759,7 +802,7 @@
} }
}) })
}, },
postTable(){ postTable() {
let params = this.dataGradto let params = this.dataGradto
postAction(this.url.getDocumentInfo, params).then((res) => { postAction(this.url.getDocumentInfo, params).then((res) => {
if (res.success) { if (res.success) {
@@ -376,7 +376,7 @@
width: 150 width: 150
}, },
{ {
title: this.$t('ImplementationDate'), title: this.$t('implementationDateTwo'),
dataIndex: 'implementationDate', dataIndex: 'implementationDate',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
@@ -42,7 +42,7 @@
<span slot="serial_number" slot-scope="text,result"> <span slot="serial_number" slot-scope="text,result">
<a @click="standClick(result)" :title="text">{{text}}</a> <a @click="standClick(result)" :title="text">{{text}}</a>
</span> </span>
<span slot="vehicleInProductionDate" slot-scope="text,result"> <span slot="vehicleInProductionDate" slot-scope="text,result" :title="text">
<span v-if="result.xin1_che1_xing2_shi2_shi1_ri4_qi1 == 'yellow'"> <span v-if="result.xin1_che1_xing2_shi2_shi1_ri4_qi1 == 'yellow'">
{{text}} {{text}}
</span> </span>
@@ -53,7 +53,7 @@
{{text}} {{text}}
</span> </span>
</span> </span>
<span slot="ImplementationDate" slot-scope="text,result"> <span slot="ImplementationDate" slot-scope="text,result" :title="text">
<span v-if="result.new_colour == 'yellow'" style="color: #fdd835"> <span v-if="result.new_colour == 'yellow'" style="color: #fdd835">
{{text}} {{text}}
</span> </span>
@@ -64,7 +64,7 @@
{{text}} {{text}}
</span> </span>
</span> </span>
<span slot="vehicleInProductionDate" slot-scope="text,result"> <span slot="vehicleInProductionDate" slot-scope="text,result" :title="text">
<span v-if="result.implement_colour == 'yellow'" style="color: #fdd835"> <span v-if="result.implement_colour == 'yellow'" style="color: #fdd835">
{{text}} {{text}}
</span> </span>