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:'实施日期',
} }
@@ -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
@@ -271,10 +280,11 @@
<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> </div>
<a-form-model-item class="itemModel" prop="standNumberOrClause"> <a-form-model-item class="itemModel" prop="standNumberOrClause">
<a-input class="box-input" v-model="tabledataGrad.standNumberOrClause" <a-input class="box-input" v-model.trim="tabledataGrad.standNumberOrClause"
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/> :placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -282,9 +292,10 @@
<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('Typeofimplementation')}}</span> <span class="Required">*</span>
<span :title="$t('Typeofimplementation')">{{$t('Typeofimplementation')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel-multi" prop="implementationType">
<j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType" <j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType"
:placeholder="$t('PleaseSelect')+$t('Typeofimplementation')" :placeholder="$t('PleaseSelect')+$t('Typeofimplementation')"
:type="'select'" :type="'select'"
@@ -293,14 +304,17 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<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('ImplementationDate')}}</span> <span class="Required">*</span>
<span :title="$t('implementationDateTwo')">{{$t('implementationDateTwo')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" prop="implementationDate">
<a-date-picker class="box-input" v-model="tabledataGrad.implementationDate" <a-date-picker class="box-input" v-model="tabledataGrad.implementationDate"
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')" :placeholder="$t('PleaseSelect')+$t('implementationDateTwo')"
format="YYYY-MM-DD" format="YYYY-MM-DD"
@change='dateChangeOne' @change='dateChangeOne'
style="width: 100%"/> style="width: 100%"/>
@@ -308,10 +322,12 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> </a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span>{{$t('remarks')}}</span> <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')"
@@ -344,10 +360,11 @@
<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> </div>
<a-form-model-item class="itemModel" prop="standNumberOrClause"> <a-form-model-item class="itemModel" prop="standNumberOrClause">
<a-input class="box-input" v-model="tabledataGrad.standNumberOrClause" <a-input class="box-input" v-model.trim="tabledataGrad.standNumberOrClause"
:placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/> :placeholder="$t('PleaseEnter')+$t('Statutenumberclause')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -355,9 +372,10 @@
<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('Typeofimplementation')}}</span> <span class="Required">*</span>
<span :title="$t('Typeofimplementation')">{{$t('Typeofimplementation')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel-multi" prop="implementationType">
<j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType" <j-multi-select-tag class="box-input" v-model="tabledataGrad.implementationType"
:placeholder="$t('PleaseSelect')+$t('Typeofimplementation')" :placeholder="$t('PleaseSelect')+$t('Typeofimplementation')"
:type="'select'" :type="'select'"
@@ -366,14 +384,17 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<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('ImplementationDate')}}</span> <span class="Required">*</span>
<span :title="$t('implementationDateTwo')">{{$t('implementationDateTwo')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" prop="implementationDate">
<a-date-picker class="box-input" v-model="tabledataGrad.implementationDate" <a-date-picker class="box-input" v-model="tabledataGrad.implementationDate"
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')" :placeholder="$t('PleaseSelect')+$t('implementationDateTwo')"
format="YYYY-MM-DD" format="YYYY-MM-DD"
@change='dateChangeOne' @change='dateChangeOne'
style="width: 100%"/> style="width: 100%"/>
@@ -381,10 +402,12 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12"> </a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span>{{$t('remarks')}}</span> <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')"
@@ -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>